How to get JSON from Axum 0.7.1 middleware #2371
Answered
by
davidpdrsn
Naginipython
asked this question in
Q&A
-
SummaryI had just gotten middleware finally working with http, then I find that Axum has a new update that changes middleware. So, without using
axum version0.7.1 |
Beta Was this translation helpful? Give feedback.
Answered by
davidpdrsn
Nov 28, 2023
Replies: 1 comment 1 reply
-
You can use https://docs.rs/http-body-util/latest/http_body_util/trait.BodyExt.html#method.collect body.collect().await?.to_bytes() |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Naginipython
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use https://docs.rs/http-body-util/latest/http_body_util/trait.BodyExt.html#method.collect