How can I find current Request info in my customized implementation of IntoResponse trait #573
-
I need to get the information of the Request struct in my customized implementation of IntoResponse trait. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Well the state needs to get passed from the request to the response somehow. You can either do that when constructing the response your handler or transferring it in a middleware. The docs have examples of how to write middleware. There is no way to “magically” move data from requests to responses. |
Beta Was this translation helpful? Give feedback.
Well the state needs to get passed from the request to the response somehow. You can either do that when constructing the response your handler or transferring it in a middleware. The docs have examples of how to write middleware.
There is no way to “magically” move data from requests to responses.