Skip to content

Unable to find Tower middleware signature constraints that works with both Axum and Hyper #3513

Answered by seanmonstar
francoposa asked this question in Q&A
Discussion options

You must be logged in to vote

There's a couple changes that happened:

  • hyper 0.14 uses tower::Service and http_body_04::Body traits.
  • hyper 1 uses it's own Service and http_body_1::Body traits.

So, if you're trying to upgrade your middleware, you'll want to use tower::Service and http_body v1, and then you can use it with hyper v1 thanks to this hyper-util adapter.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@francoposa
Comment options

Answer selected by francoposa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
C-bug Category: bug. Something is wrong. This is bad!
2 participants
Converted from issue

This discussion was converted from issue #3508 on January 01, 2024 16:35.