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

feat(upgrade): allow http upgrades with any body type #2680

Merged
merged 1 commit into from Nov 3, 2021

Conversation

luqmana
Copy link
Contributor

@luqmana luqmana commented Oct 30, 2021

Allow using Request<T>/Response<T> for any given T with upgrade::on instead of just restricting it to hyper::Body.

#2086 mentioned moving the upgrades API off of the Body type with part of the motivation being:

This also makes it more annoying for users who may wish adjust their http::Request<Body> into some http::Request<Doodad>.

But the current API is still restricted to just the hyper::Body body type which seems more strict than it needs to be.

@luqmana luqmana changed the title feat(upgrade): allow http upgrades on with body type feat(upgrade): allow http upgrades with any body type Oct 30, 2021
src/upgrade.rs Outdated Show resolved Hide resolved
Allow using `Request<T>`/`Response<T>` for any given T with
`upgrade::on` instead of just restricting it to `hyper::Body`.
Copy link
Member

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@seanmonstar seanmonstar merged commit ab469eb into hyperium:master Nov 3, 2021
@luqmana luqmana deleted the generic-upgrade branch November 3, 2021 19:22
@luqmana
Copy link
Contributor Author

luqmana commented Nov 3, 2021

Np, thanks for merging! What's the policy on getting a release on crates.io?

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.

None yet

3 participants