pub fn parse_json_body<T: DeserializeOwned>(
req: &HttpRequest,
) -> Result<T, HttpResponse>Expand description
Parse a JSON request body strictly (RA-ERR-4):
- If
Content-Typeis present and not JSON (application/jsonor+json), returns415. - If the body is empty or malformed JSON, returns
400application/problem+json.