Talking about HTTP common status codes

On the classification of HTTP common status codes
  • 1xx Informational (informative status code) The accepted request is being processed
  • 2xx Success (success status code) The request is processed normally
  • 3xx Redirection requires additional action to complete the request
  • 4xx Client error There was an error in the client request and the server could not process the request
  • 5xx Server Error There was an error in the server processing the request
Common status codes of each category:
1 series:

100: This status code tells the client that it should continue to send the request. This temporary response is used to notify the client that part of the request has been accepted by the server, but the client should continue to send the remaining part of the request. If the request has been completed, ignore it This response, and the server will send a final result to the client after the request is completed

2 series:

200 OK: This is the most common http status code, which means that the server has successfully accepted the request and will return the final result requested by the client;
202: It means that the server has accepted the request, but has not yet processed it, and the request will eventually fail Will be processed. Not sure yet.
204 No Content: The server successfully processed the request sent by the client, but did not return any entity content, and may return new header meta information;
206 Patial Content: Indicates that the client made a range request and the server This part of the GET request is successfully executed, and the response message contains the entity content in the range specified by the Content-Range.

3 series:

301 Moved Permanently: Permanent redirect, which means that the requested resource is assigned a new URL, and the changed URL should be used afterwards;
302 Found: Temporary redirect, which means that the requested resource is assigned a new URL and hope to visit this time Use a new URL;
the difference between 301 and 302: the former is a permanent move, the latter is a temporary move (the URL may be changed later)
303 See Other: indicates that the requested resource is assigned a new URL, and the GET method should be used for directed acquisition The requested resource;
the difference between 302 and 303: The latter clearly indicates that the client should use GET to obtain resources.
304 Not Modified: indicates that the client sends additional conditions (refers to the request message using the GET method that contains if-Match, If- Modified-Since, If-None-Match, If-Range, If-Unmodified-Since any header) request, the server side allows access to resources, but the request is to meet the conditions to return the status code, before us On the premise that the resource has been accessed, the browser may load from the cache;
307 Temporary Redirect: Temporary Redirect, has the same meaning as 303, 307 will not change from POST to GET according to the browser standard; (different browsing The device may appear differently);

4 series:

400 Bad Request: indicates that there is a grammatical error in the request message;
401 Unauthorized: requires HTTP authentication without permission;
403 Forbidden: the server refuses the access (there is a problem with the access authority)
404 Not Found: indicates that the request cannot be found on the server Resource, that is: the request fails, the resource requested by the client is not found or does not exist

5 series:

500 Inter Server Error: Indicates that an error occurred when the server was executing the request. It may also be a bug in the web application or some temporary errors;
503 Server Unavailable: Indicates that the server is temporarily overloaded or is being shut down for maintenance and cannot process the request. ;

Disclaimer: Encounter in the vast sea is fate. All the content in this blog is only for personal knowledge and historical experience accumulation. If there is any error, please comment in the comment area. It is a personal honour for this blog to be helpful to your work, and you are welcome to like, forward, comment, and follow.

Guess you like