Returning Response from endpoint #1782
-
I'm trying to move my server to 0.5.0, and am having trouble with returning a Response<'a> from an endpoint. Previously I did:
Now I get an error I read the changelog and noticed this line:
The problem is that I'm not sure if I can use a custom responder, since I am returning a JSON response with CORS options:
Is it possible to create a custom responder with raw headers like those above? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Of course. Everything that sends a response is a |
Beta Was this translation helpful? Give feedback.
Of course. Everything that sends a response is a
Responder
, so if this wasn't possible, Rocket would be rather useless. See theResponder
docs.