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 support for axum's IntoResponse #1816

Open
mscofield0 opened this issue May 1, 2023 · 2 comments
Open

Add support for axum's IntoResponse #1816

mscofield0 opened this issue May 1, 2023 · 2 comments

Comments

@mscofield0
Copy link

Currently I have an endpoint that just makes requests to individual services and there's no way currently to bridge between the two Response types.

This could be fixed by adding a into_http() or as_http() to the Response type.

@1oglop1
Copy link

1oglop1 commented May 3, 2023

It would be great... I spent a week learning Rust and doing exactly this to send 1 request and return its response.
I am converting the incoming request body (bytes) into reqwest::Body::from(raw_body); and then building the response from reqwest::Response attributes.

@shouya
Copy link
Contributor

shouya commented Dec 13, 2023

I added the conversion from reqwest::Response to http::Response<reqwest::Body> as well as reqwest::Body as http_body::Body in #2060. That PR should fix this issue.

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