HTTP

HTTP 308 Permanent Redirect vs 415 Unsupported Media Type

HTTP 308 (Permanent Redirect) is a 3xx Redirection response, while 415 (Unsupported Media Type) is a 4xx Client Error response. 308 indicates that the resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed. In contrast, 415 means that the server refuses to accept the request because the Content-Type is not supported.

Description

The resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed.

When You See It

For permanent URL changes where POST requests must remain POST.

How to Fix

Update all references to the new URL. The HTTP method is preserved.

Description

The server refuses to accept the request because the Content-Type is not supported.

When You See It

When sending JSON to an endpoint that only accepts XML, or missing the Content-Type header.

How to Fix

Set the correct Content-Type header matching the data format you're sending.

Key Differences

1.

308 is a 3xx Redirection response, while 415 is a 4xx Client Error response.

2.

HTTP 308: The resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed.

3.

HTTP 415: The server refuses to accept the request because the Content-Type is not supported.

4.

You encounter 308 when for permanent URL changes where POST requests must remain POST.

5.

You encounter 415 when when sending JSON to an endpoint that only accepts XML, or missing the Content-Type header.

When to Use Which

For 308 (Permanent Redirect): Update all references to the new URL. The HTTP method is preserved. For 415 (Unsupported Media Type): Set the correct Content-Type header matching the data format you're sending.

Learn More