Skip to content

Support for streaming responses #20

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

Open
clotodex opened this issue Apr 20, 2023 · 3 comments
Open

Support for streaming responses #20

clotodex opened this issue Apr 20, 2023 · 3 comments

Comments

@clotodex
Copy link

AWS recently released support to stream responoses, see here

Since it accepts any kind of response (streamed or not) I think this should be implementable. I am using rocket so I only looked at that part of the code, but it seems like the major change would be to return a response instead of a value and adding all relevant headers etc to that response.

@clotodex
Copy link
Author

Alright looking more into it it is definitely possible, since rocket::Response returns AsyncRead which can be accepted as stream into the hyper:::Response.
But I met my match with lifetimes and async - I for the life of me cannot figure out how to make the AsyncRead live long enough for the lambda response.

@sam-rusty
Copy link

is there any update on this?

@boymaas
Copy link

boymaas commented Feb 20, 2024

also looking to support streaming responses, would be amazing if this works out of the box with axum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants