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

[Feature Request] add tower::Service implementation for http::Request and http:: Response types. #2251

Open
alekseysidorov opened this issue Apr 19, 2024 · 0 comments

Comments

@alekseysidorov
Copy link

alekseysidorov commented Apr 19, 2024

reqwest::Client already has tower::Service implementation for the reqwest::Request and reqwest::Response types. But it lacks of the service implementation for http::Request and http::Response types. If we add this implementation we can use a lot of existing layers from the tower_http crate without any code modification.

I already implemented this feature in my own crate. But I believe it would be better to add this functionality to the core library than to use adapters.

Here is my implementation.

@alekseysidorov alekseysidorov changed the title [Feature Request] impl<S, ReqBody> tower::Service<http::Request<ReqBody>> for reqwest::Client [Feature Request] add tower::Service implementation for http::Request and http:: Response types. Apr 19, 2024
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

1 participant