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

Return reqwest response as-is #46

Closed
jscheid opened this issue Aug 20, 2019 · 3 comments
Closed

Return reqwest response as-is #46

jscheid opened this issue Aug 20, 2019 · 3 comments
Assignees

Comments

@jscheid
Copy link

jscheid commented Aug 20, 2019

Hi, thanks for this crate. I have a small feature request: currently, Request::execute can either write the response body to a writer or return it as a blob. It would be useful if, as a third option, it could return the response as-is. This would allow "pull" streaming the response - ie. reading from it.

@durch
Copy link
Owner

durch commented Aug 22, 2019

@jscheid just published 0.16.0-alpha2 to crates.io. It expose a request.send() method which returns impl Future<Item=Response, Error=S3Error>. Let me know if that is what you're after.

You can escape that Future with wait(), which will get you reqwest::async::Response

@durch durch self-assigned this Aug 22, 2019
@durch
Copy link
Owner

durch commented Sep 2, 2019

Reworked the async interface to be a bit more ergonomic, I'd suggest you take a look at 0.17.0-beta, getting the future directly is supported quite nicely now.

@durch durch closed this as completed Sep 2, 2019
@jscheid
Copy link
Author

jscheid commented Sep 3, 2019

Awesome, thanks!

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

2 participants