Status codes are not available for every situation, for future expansion.
Some common status codes are:
1. Starting with 1#
1xx (Informational) indicates that the server has received the request and is continuing the process. Code Description
100 (Continue) The server has received the request headers and the client should proceed to send the request body.
101 (Switching Protocols) The server has received a request to switch protocols and is willing to comply.
2. Starting with 2#
2xx (Successful) indicates that the request was successfully received, understood, and accepted. Code Description
200 (OK) The request has succeeded. The information returned with the response is dependent on the method used in the request.
201 (Created) The request has been fulfilled, resulting in the creation of a new resource.
202 (Accepted) The request has been accepted for processing, but the processing has not been completed.
203 (Non-Authoritative Information) The server has successfully processed the request, but the information returned may be from a different source.
204 (No Content) The server has successfully processed the request, but there is no content to return.
205 (Reset Content) The server has successfully processed the request, but there is no content to return.
206 (Partial Content) The server has successfully processed a partial GET request.
3. Starting with 3#
3xx (Redirection) indicates that further action needs to be taken in order to complete the request. These status codes are used for redirection. Code Description
300 (Multiple Choices) The server has multiple options for the resource that the client can choose from. The server may provide a list of options or perform the requested action based on the user agent.
301 (Moved Permanently) The requested resource has been permanently moved to a new location. The server will automatically redirect the client to the new location for GET or HEAD requests.
302 (Found) The server is currently responding to the request with a different location, but the client should continue to use the original location for future requests.
303 (See Other) The client should make a separate GET request to the different location specified by the server.
304 (Not Modified) The requested resource has not been modified since the last request. The server will not return the content of the resource.
305 (Use Proxy) The client can only access the requested resource through a proxy. If the server returns this response, it also indicates that the client should use a proxy.
307 (Temporary Redirect) The server is currently responding to the request with a different location, but the client should continue to use the original location for future requests.
4. Starting with 4#
4xx (Client Error) indicates that the client's request contains incorrect syntax or cannot be fulfilled. Code Description
400 (Bad Request) The server cannot understand the request due to invalid syntax.
401 (Unauthorized) The request requires user authentication. The server may return this response for pages that require login.
403 (Forbidden) The server refuses to fulfill the request.
404 (Not Found) The server cannot find the requested resource.
405 (Method Not Allowed) The method specified in the request is not allowed.
406 (Not Acceptable) The server cannot produce a response matching the list of acceptable values defined in the request.
407 (Proxy Authentication Required) This status code is similar to 401 (Unauthorized), but indicates that the client must authenticate with a proxy.
408 (Request Timeout) The server timed out waiting for the request.
409 (Conflict) The server encountered a conflict while processing the request. The server must include information about the conflict in the response.
410 (Gone) The requested resource is no longer available and will not be available again.
411 (Length Required) The server does not accept requests without a valid Content-Length header field.
412 (Precondition Failed) The server does not meet one of the preconditions specified in the request.
413 (Payload Too Large) The server cannot process the request because the request entity is too large.
414 (URI Too Long) The server cannot process the request because the URI is too long.
415 (Unsupported Media Type) The server cannot process the request because the media type is not supported.
416 (Range Not Satisfiable) The server cannot provide the requested range.
417 (Expectation Failed) The server cannot meet the requirements of the Expect request-header field.
5. Starting with 5#
5xx (Server Error) indicates that the server encountered an error while processing the request. These errors are usually caused by the server itself, not the client's request. Code Description
500 (Internal Server Error) The server encountered an error and cannot complete the request.
501 (Not Implemented) The server does not support the functionality required to fulfill the request. For example, the server may not recognize the request method.
502 (Bad Gateway) The server received an invalid response from an upstream server acting as a gateway or proxy.
503 (Service Unavailable) The server is currently unable to handle the request (due to overload or maintenance). This is a temporary state.
504 (Gateway Timeout) The server acting as a gateway or proxy did not receive a timely response from an upstream server.
505 (HTTP Version Not Supported) The server does not support the HTTP protocol version used in the request.