Unclear why Json cannot be in repsonse part. #2017
-
I try to write a handler which return JSON, of which the content depends if a user is know or not. Simply replying HTML works, as can be seen by un-commenting the multi-line comments in the example below.
The error reply is:
So how can I make the handler which return JSON with a status code too? |
Beta Was this translation helpful? Give feedback.
Answered by
davidpdrsn
May 22, 2023
Replies: 1 comment 1 reply
-
You're missing |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
peter-scholtens
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You're missing
#[derive(Serialize)]