An HTTP status code is part of the header line of the web server's response to a client request, indicating the result of the request and what the client should do next. Everyone who uses the Internet has more than once encountered the 404 Not Found or 403 Forbidden page. The response code is followed by an explanatory phrase in English separated by a space, which explains to the person the reason for this particular response.
HTTP status codes are divided into 5 categories. The client may not be familiar with a particular HTTP response code, but it must respond according to the code category. So the HTTP protocol supports the following status codes, divided into categories:
1xx: Information - informational
100 Continue - Continue.
The server is satisfied with the data in the client request, you can continue sending headers. Appeared in protocol version HTTP/1.1.
101 Switching Protocols - Switching protocols.
The server prompts you to select another protocol that is more appropriate for this resource. The protocols offered by the server are indicated in the Update header line; if the protocol proposed by the server suits the client, it sends a new request indicating the new protocol. Appeared in protocol version HTTP/1.1.
102 Processing - Processing.
Used in the WebDAV protocol, which runs on top of the HTTP protocol. This status code informs the client that the request has been accepted, but it may take some time to process it so that it (the client) does not reset the connection. In this case, the client must reset the timer and wait for the next command.
2xx: Success - Successful completion
200 OK - Okay.
The request to the resource was completed successfully. The data requested by the client is in the header and/or body of the response. Appeared in protocol version HTTP/1.0.
201 Created - Created.
The request was completed successfully and a new resource was created. The server response, in the Location header, indicates the location of the created resource. In addition, the server is recommended to indicate the characteristics of the created resource in the response header. Appeared in protocol version HTTP/1.0.
202 Accepted - Accepted.
The request has been accepted, but is still being processed. Appeared in protocol version HTTP/1.0.
203 Non-Authoritative Information - Information from an unauthorized source.
Similar to code 200, but in this case the information may not be relevant, since it was not taken from the original source. Appeared in protocol version HTTP/1.1.
204 No Content - There is no content.
The server successfully processed the request but did not return any content. Appeared in protocol version HTTP/1.0.
205 Reset Content - Reset content.
The server successfully processed the request but did not return any content. Unlike code 204, this code requires the client to reset the document presentation. Appeared in protocol version HTTP/1.1.
206 Partial Content - Part of the content.
The server returned the result of the client's request, a piece of content, using the range header. Used for resuming files or for multi-threaded downloading. Appeared in protocol version HTTP/1.1.
207 Multi-Status - Multi-status.
The message body returned by the server is an XML document with the execution status of several subqueries. Used in the WebDAV protocol.
226 IM Used - IM used
An HTTP extension to support delta encoding. The A-IM header is accepted and the data is returned according to the configured parameters.
3xx: Redirection - Redirect (redirection)
Codes in this category inform the client that in order to complete the request, he needs to perform an additional request, usually using a different URI; the corresponding address is indicated in the Location line of the server response. The client program can make additional requests without user intervention, provided that the additional request is made using the GET or HEAD methods.
Some clients do not work correctly with 301 and 302 redirects by using the GET method in the request to the second resource, despite the fact that the first request was made using a different method. In the HTTP protocol version 1.1, instead of a response with status 302, additional response codes, 303 and 307, were introduced. It is necessary to change the method only in the case of a server response with status 303; in other cases, use the original method.
300 Multiple Choices - Several options to choose from.
According to the requested URI, there are several resource options, different in MIME type. language or other signs. The server response contains a list of alternatives, selected automatically by the client application or by the user himself. Appeared in protocol version HTTP/1.0.
301 Moved Permanently - Moved permanently.
The requested resource was finally moved to the URI specified in the Location header line of the server response. Some clients behave incorrectly when processing this code, see above. Appeared in protocol version HTTP/1.0.
302 Found - Found (Moved Temporarily)
This status code tells the client that the resource is temporarily available at a different URI specified in the Location header line of the server response header. This code is used