Skip to content

4xx Client errors

415 Unsupported Media Type

The server does not accept the request's Content-Type, for example form data sent to a JSON-only API.

Common causes

  • A missing or wrong Content-Type header.

How to fix a 415 error

  1. 1

    Send Content-Type: application/json with JSON bodies, or multipart/form-data with file uploads.

Check the status of a URL

The first line of the response shows the status code; -L follows redirects and shows each step.

curl -I https://example.com/page
curl -IL https://example.com/old-page

Frequently asked questions

What does HTTP 415 mean?

The server does not accept the request's Content-Type, for example form data sent to a JSON-only API.

How do I fix a 415 error?

Send Content-Type: application/json with JSON bodies, or multipart/form-data with file uploads.

Get new articles in your inbox

Practical tutorials and deep dives, about once a week. No spam, unsubscribe anytime.

Privacy policy

Add DEV Talk to your Home Screen

  1. 1 Tap the Share button in Safari's toolbar.
  2. 2 Scroll down and tap Add to Home Screen.
  3. 3 Tap Add. Open it from the Home Screen to read like an app and to turn on notifications with the bell.

We use cookies to improve your experience and analyze traffic. By continuing, you agree to our Privacy Policy.