How to deserialize a Response
in this middleware?
#2539
Unanswered
frederikhors
asked this question in
Q&A
Replies: 1 comment 3 replies
-
It works if I use the below code, but I'm a bit scared about all this code in this hot path middleware, is there something I can remove? let mut body = resp.collect().await.unwrap().aggregate();
let response_as_json = ResponseAsJson::deserialize_json(&body.copy_to_bytes(body.remaining())); |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Since this is an hot path of my backend I would like to better understand what is goiing on.
How can I get the JSON at the end of
fn check()
?axum version
0.7
Beta Was this translation helpful? Give feedback.
All reactions