-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Middleware that change the request body have poor usability #1110
Comments
I think this is closely related to #1154. If axum had its own body type, and a way to construct that from any That is something we'll have to explore once the development of hyper 1.0 (and hyper-utils) is further along. Hyper 1.0 will require a breaking release of axum anyway, so I think we should wait with this until we're closer to that happening. I'm gonna remove this from the 0.6 milestone. |
why does |
Mostly history.
I tried previously to implement Edit: Its possible #1389! |
I'm trying to use
This is what my router looks like:
|
The following compiles fine:
|
@avdb13 please open a separate issue/discussion about that and please include a minimal reproducible example that we can run. |
I'd say this has been solved by #1751. TLDR: in axum 0.7 the |
We've heard from several people who try to use
tower_http::limit::RequestBodyLimitLayer
that the implications are hard to understand.For example breaking your
Router
into functions is quite common. Something like:Adding
RequestBodyLimitLayer
like soshould just work but produces a rather confusing error:
The solution is instead to write
but that isn't obvious and ideally shouldn't be necessary.
We should think about ways to improve that experience.
The text was updated successfully, but these errors were encountered: