The HTTP 300 status code stands for "Multiple Choices". It is a redirection response indicating that the requested resource has multiple representations, and the client (or user) must choose one.
When is HTTP 300 Used?
- When a resource has multiple versions (e.g., different formats, languages, or media types).
- The client may be given a list of available choices to select from.
- The server may or may not include a preferred choice in the response.
Example Scenarios
- Content Format Selection – A document is available in PDF, HTML, and JSON, and the user must choose one.
- Language Selection – A page has versions in English, Spanish, and French.
- Multiple Endpoints – A request could be handled by multiple servers or resources.
Example
Client Request (Requesting a Resource)
GET /document HTTP/1.1
Host: example.com
Server Response (Multiple Choices Available)
HTTP/1.1 300 Multiple Choices
Content-Type: application/json
{
"options": [
{ "url": "/document.pdf", "type": "application/pdf" },
{ "url": "/document.html", "type": "text/html" },
{ "url": "/document.json", "type": "application/json" }
]
}
Summary
HTTP 300 means the requested resource has multiple representations, and the client must choose one. It is often used for format selection, language preference, or alternative endpoints.