@http · HTTP status codes, explained HTTP/1.1 415 Unsupported Media Type ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4xx · Client error The server doesn't accept this Content-Type. WHAT IT MEANS ──────────────────────────────────────────────────────────── The server won't accept the body's format, given by Content-Type, or its encoding, given by Content-Encoding. It may list the formats it does accept in Accept, Accept-Post or Accept-Encoding. WHY YOU'RE SEEING IT ───────────────────────────────────────────────────── → Sending JSON without Content-Type: application/json. → Sending form data to an endpoint that only reads JSON, or the reverse. → A compressed body the server can't decode. HOW TO FIX IT ──────────────────────────────────────────────────────────── → Set Content-Type to match the body. → In curl, --json sets the header for you; -d alone sends application/x-www-form-urlencoded. EXAMPLE RESPONSE ───────────────────────────────────────────────────────── HTTP/1.1 415 Unsupported Media Type Accept-Post: application/json Content-Length: 0 related 406 Not Acceptable   400 Bad Request   422 Unprocessable Content spec RFC 9110 §15.5.16 https://www.rfc-editor.org/rfc/rfc9110#section-15.5.16 web https://athttp.com/415 ← curl athttp.com/414 curl athttp.com/416 →