Hi everyone, I've been looking for this answer but I cound't find a straight answer.
I'm hardening my API REST, and one of the points I have to implement says: "Reject requests containing unexpected or missing content type headers with HTTP response status 406 Unacceptable or 415 Unsupported Media Type" I've been looking to do the filtering of content types, but I don't have any clue about how to solve this, and the other thing is that I haven't found how to send a specific http code in that scenario.
Can anyone guide me to how to solve this?
Thank you very much in advance.
Kindly regrads,
Rodrigoqwq
I'm hardening my API REST, and one of the points I have to implement says: "Reject requests containing unexpected or missing content type headers with HTTP response status 406 Unacceptable or 415 Unsupported Media Type" I've been looking to do the filtering of content types, but I don't have any clue about how to solve this, and the other thing is that I haven't found how to send a specific http code in that scenario.
Can anyone guide me to how to solve this?
Thank you very much in advance.
Kindly regrads,
Rodrigoqwq