unsupported_ media_ type
The body isn't sent as JSON.
On this page
HTTP status: 415 Unsupported Media Type. Retrying the same request unchanged fails the same way.
Why it happens
- Content-Type isn't application/json, or names a charset other than UTF-8.
- The body is compressed (a Content-Encoding header).
What to do
Send uncompressed JSON with Content-Type: application/json.
Example
The response is application/problem+json. Branch on code, never on title or detail. See errors for the format.
{
"type": "https://docs.nowgate.io/errors/unsupported_media_type",
"title": "Unsupported Media Type",
"status": 415,
"detail": "What exactly was wrong, in a sentence.",
"instance": "/v1/payments",
"code": "unsupported_media_type",
"request_id": "req_01jc3xb1n6f0q2w8e4r7t5y9v3"
}