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

Add Response::into_parts #1951

Closed
wants to merge 3 commits into from
Closed

Conversation

Threated
Copy link
Contributor

This is useful when using reqwest as a http client in a proxy server and you need to convert the response type without cloning everything.
I also had implemented From<Request> for http::Request<hyper::Body> but since this would break with hyper 1.0 I decided to leave it out.

@seanmonstar
Copy link
Owner

I think a From<Response> for http::Response makes most sense. reqwest will need to be updated for hyper 1.0 anyways.

@Threated
Copy link
Contributor Author

Threated commented Aug 25, 2023

Oh yeah that was what I meant 🤦. So should I add that as well since there will be a lot rewritten with hyper 1.0 anyway?

@seanmonstar
Copy link
Owner

I think so. I think it's better than an into_parts methodml (I'd suggest removing that).

@Threated
Copy link
Contributor Author

Yeah I guess that makes sense since converting to a hyper style response was really the reason I made this PR.
I will put the change in another PR.

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

Successfully merging this pull request may close these issues.

2 participants