Replies: 1 comment
-
|
Maybe you could use this method to get the |
Beta Was this translation helpful? Give feedback.
0 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.
-
Summary
I need to write a middleware that's supposed to read the body in case the request fails with an error. This is what I have right now:
I want to know what's the best way of implementing the cloning part. I know that the body can be buffered, which is why it doesn't have a
clonemethod.One way I can think of is to buffer the whole body, clone it, and then create a new
Responsewith the status code, headers, and the buffered body. I wonder if that's enough and whether I'm forgetting something.axum version
0.8.1
Beta Was this translation helpful? Give feedback.
All reactions