Skip to content

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

Merged
seanmonstar merged 1 commit into
hyperium:masterfrom
luqmana:generic-upgrade
Nov 3, 2021
Merged

feat(upgrade): allow http upgrades with any body type#2680
seanmonstar merged 1 commit into
hyperium:masterfrom
luqmana:generic-upgrade

Conversation

@luqmana

@luqmana luqmana commented Oct 30, 2021

Copy link
Copy Markdown
Contributor

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
Comment thread src/upgrade.rs Outdated
Allow using `Request<T>`/`Response<T>` for any given T with
`upgrade::on` instead of just restricting it to `hyper::Body`.

@seanmonstar seanmonstar left a comment

Copy link
Copy Markdown
Member

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

luqmana commented Nov 3, 2021

Copy link
Copy Markdown
Contributor Author

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.

3 participants