News for hackers. Stuff that matters.
Re:I've been abusing HTTP Status Codes in my APIs for years by dragonwriter on Wednesday July 13, 2022 @12:39PM (#32085114)
> There’s nothing in the protocol, but in general, you should not assume non-2xx status codes have parseable payloads (more specifically, you should not assume the format of a non-200 status code).

There’s absolutely something in the protocol, and you should absolutely use the Content-Type header to determine whether there is a body and whether it is in a parseable format irrespective of the status code, except for the minority of status codes defined as not having a body (e.g., 204 & 205.)

Re:I've been abusing HTTP Status Codes in my APIs for years by yencabulator on Wednesday July 13, 2022 @06:12PM (#32089388)
Unfortunately real-world use is `Content-Type: application/json` for everything.