First, status code classification:
Second, the common status code 1. 2XX Series
OK
Indicates that the request is handled properly by the server, the most common is this, as the information returned by this status code is related to your request method, such as a GET request, the requested resource is returned as the response entity, and the head request information only exists in the response message header, because it does not return the message entity, only return the message header.
204 No Content
Indicates that the request has been processed successfully, but no content is returned (there should be no content returned), that is, there is no message entity in the returned response message (in fact, there is no body part of the message entity), the browser sent a request to the server received 204, then the browser page will not be updated, This is typically used in situations where the client sends information to the server and the server does not return any information to the client.
206 Partial Content
Indicates that the server has completed a partial GET request (the client has made a scope request), and the response message contains the entity content content-range the specified range
2.3XX Series
301 Moved Permanently
Permanent redirection, indicating that the requested resource has been permanently moved to another location, meaning that the resource has been assigned a new URI, the new URI should prompt in the Location header field of the response message, as long as it is not a head request, the response entity should contain a hyperlink to the new URI and a short description
302 Found
Temporary redirection, indicating that the requested resource is temporarily moved to another location, the requested resource is temporarily provisioned to the new URI, and the 301 is much like, except that the resource is temporarily moved and the resource may change in the future, similarly, the new temporary URI should prompt in the Location header field of the response message, As long as it is not a head request, the response entity should contain a hyperlink to the new URI and a short description
303 See other
Indicates that there is another URI for the request resource, which should be used to get the request resource, 303 functions with 3,021 like, the difference is only 303 explicit client should use get access (many http/1.1 browsers do not understand 303, but everyone treats 302 as 303, Use GET request new URI)
304 Not Modified
Indicates that the client sends a request with a condition (GET method Request message in the If ... ), when the condition is not met, returns 304, does not contain any response body, although 304 is divided in 3XX, but and redirect a gross money relationship is not
307 Temporary Redirect
Temporary redirection, which has the same meaning as 302, although the 302 standard disables post to get, but no one listens to him, and 307 complies with the standard, does not change from post to get, but handles response behavior, each browser may be different
3.4XX Series
Request
Indicates that there is a syntax error or parameter error in the request message, the server does not understand that the server should not repeatedly submit this request, need to modify the content of the request to send again
401 Unauthorized
Indicates that a request for sending requires HTTP authentication information or authentication failed, and a response that returns 401 must contain a www-authenticate header for the requested resource to challenge the user information, which will pop up the authentication window when the browser first accepts 401
403 Forbidden
Indicates that access to the requested resource has been rejected by the server, the server can explain it, or it can not explain, if you want to explain, you can describe the reason in the body of the response entity, for example, you may not have access rights
404 Not Found
Indicates that the server can not find the resources you requested, it is possible that the server did not want to give you and then cheat you can't find (⊙?⊙), and most of the servers are playing this status code
4.5XX Series
Internal Server Error
Indicates that the server is executing the request error, the Web application may be a bug or a temporary failure, more likely the server source code has a bug ...
503 Service Unavailable
Indicates that the server is overloaded or is being shut down, cannot process the request, and if the server knows how long it will take, write the Retry-after header field back
Iii. Summary
The return status code and state inconsistencies are likely to occur, such as a Web application internal error, but still return a $ OK.
OK
Request normal processing complete
204 No Content
The request was processed successfully and no entity's principal returned
206 Partial Content
Get scope request processed successfully
301 Moved Permanently
Permanent redirection, the resource has been permanently assigned a new URI
302 Found
Temporary redirect, resource temporarily assigned new URI
303 See other
Temporary redirection, expected to get directed with get
304 Not Modified
The sent conditional request is not met
307 Temporary Redirect
Temporary redirection, Post does not become get
Request
Request message Syntax error or parameter error
401 Unauthorized
HTTP authentication required, or authentication failed
403 Forbidden
Request Resource denied
404 Not Found
Unable to find request resource (server no reason to deny)
Internal Server Error
Server failure or Web application failure
503 Service Unavailable
Server over-load or shutdown maintenance
HTTP status Code explanation