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

Is Response::reader supposed to be awkward to get? #79

Closed
octylFractal opened this issue Sep 27, 2020 · 3 comments
Closed

Is Response::reader supposed to be awkward to get? #79

octylFractal opened this issue Sep 27, 2020 · 3 comments

Comments

@octylFractal
Copy link

I have code that uses the Read trait to stream the response data, but in order to get that for this library I had to jump through Request::split: request.split().2. Is there a reason that a simple Request::reader() isn't exposed?

@sbstp
Copy link
Owner

sbstp commented Oct 10, 2020

Kinda. The reason why you have to do this, is because the methods like text_reader consume the response.

I think Read could be implemented on the response though and it's just going to return EOF when the response has already been fully read.

@sbstp
Copy link
Owner

sbstp commented Oct 11, 2020

Added Read on the Response object.

@octylFractal
Copy link
Author

That works for me, 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