Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream large HTTP bodies #256

Open
LucasPickering opened this issue Jun 9, 2024 · 0 comments
Open

Stream large HTTP bodies #256

LucasPickering opened this issue Jun 9, 2024 · 0 comments
Labels
qol Improvements that make usage smoother, without introducing new functionality

Comments

@LucasPickering
Copy link
Owner

LucasPickering commented Jun 9, 2024

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

It should be possible to stream large HTTP bodies (e.g. large file uploads), such that the entire body is never loaded into memory.

Describe the solution you'd like
A clear and concise description of what you want to happen

Templates should provide a Stream interface that allows you to stream bytes from them rather than loading and stitching everything together. For raw sections of the template we could just stream what's already in memory. For chains we could stream from whatever the byte source is (file, command, etc.).

We need a way to tell Slumber when to do this. For multipart requests it's easy, just always do it because reqwest insists on it. It should be possible to opt-in for any recipe though. The easy solution is a boolean stream field on the recipe, but we should consider alternatives.

We should also find a decent way to store the streamed body in history. Since we can't store the whole bytes, maybe just some sort of descriptor of where the data was streamed from.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered

Additional context
Add any other context or screenshots about the feature request here

@LucasPickering LucasPickering added the qol Improvements that make usage smoother, without introducing new functionality label Jun 9, 2024
LucasPickering added a commit that referenced this issue Jun 9, 2024
Add a new structured body type !form_multipart, which allows sending forms with binary data. This is a bit incomplete, we need to support streaming bodies in #256.

Closes #243
LucasPickering added a commit that referenced this issue Jun 9, 2024
Add a new structured body type !form_multipart, which allows sending forms with binary data. This is a bit incomplete, we need to support streaming bodies in #256.

Closes #243
LucasPickering added a commit that referenced this issue Jun 9, 2024
Add a new structured body type !form_multipart, which allows sending forms with binary data. This is a bit incomplete, we need to support streaming bodies in #256.

Closes #243
LucasPickering added a commit that referenced this issue Jun 9, 2024
Add a new structured body type !form_multipart, which allows sending forms with binary data. This is a bit incomplete, we need to support streaming bodies in #256.

Closes #243
@LucasPickering LucasPickering added this to the 1.5.0 milestone Jun 10, 2024
@LucasPickering LucasPickering removed this from the 1.5.0 milestone Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qol Improvements that make usage smoother, without introducing new functionality
Projects
None yet
Development

No branches or pull requests

1 participant