Client Error (4xx)

HTTP 415 โ€” 415 Unsupported Media Type

The request entity has a media type which the server or resource does not support.

Common Causes & Diagnoses
  • โ€ขSending XML or text/plain to an endpoint expecting Content-Type: application/json.
Spesifikasyon & Kategori
Status Code:415
Category:Client Error (4xx)
RFC Standard:RFC 9110 / HTTP/1.1 & HTTP/2
Multi-Language Code Implementations

How to Handle, Return & Test HTTP 415

Status: 415 415 Unsupported Media Type
server.js / handler.ts
// Express.js Server Response
app.get('/api/resource', (req, res) => {
  // Returning 415 415 Unsupported Media Type
  return res.status(415).json({
    error: '415 Unsupported Media Type',
    statusCode: 415,
    timestamp: new Date().toISOString()
  });
});

// Client-side fetch error check
const response = await fetch('/api/resource');
if (response.status === 415) {
  console.warn('Received HTTP 415 415 Unsupported Media Type');
}
๐Ÿ’ก Pro Tip: Ensure appropriate error handling middleware or proxy interceptors are enabled so client applications receive structured JSON responses for HTTP 415.
How to Fix / Practical Code Solutions

Set Content-Type Header

Set headers: { "Content-Type": "application/json" } in client fetch.

Other Popular HTTP Status Codes
Frequently Asked Questions

Common Questions About HTTP 415 to RFC Standard

Everything you need to know regarding specifications, syntax, and security best practices.

The request entity has a media type which the server or resource does not support. In Turkish: ฤฐsteฤŸin Content-Type baลŸlฤฑฤŸฤฑ sunucu tarafฤฑndan desteklenmiyor.