The HTTP status code represents the status of the response returned by the HTTP protocol. For example, the client sends a request to the server, and if the requested resource is successfully obtained, the returned status code is 200, indicating the corresponding success. If the requested resource does not exist, a 404 error is typically returned.
HTTP status codes are usually divided into 5 types, which begin with the five digits of the number, and consist of a 3-bit integer. 1XX is usually used for experimental purposes. This chapter mainly introduces 2xx, 3xx, 4xx, 5xx and other common status codes.
Status code |
Code description |
Processing mode |
200 |
Request succeeded |
Get the content of the response for processing |
201 |
The request is complete and the result is a new resource is created. |
The URI of the newly created resource can be obtained in the response entity |
202 |
The request was accepted, but the processing was not completed. |
Blocking wait. |
204 |
The server side has implemented the request, but no new information is returned. If the client is a user agent, you do not need to update your own document view for this |
Discarded |
300 |
The status code is not used directly by the http/1.0 application, only as the default interpretation of the 3xx type response. There are multiple requested resources available. |
If the program can be processed, then further processing, if the program can not be processed, then discarded. |
301 |
The requested resource is assigned a permanent URL, so that the resource can be accessed in the future through that URL. |
Redirects to the assigned URL. |
60W |
The requested resource is temporarily stored at a different URL |
Redirect to a temporary URL |
304 |
The requested resource is not updated |
Discarded |
400 |
Illegal request |
Discarded |
401 |
Not authorized |
Discarded |
403 |
Ban |
Discarded |
404 |
Not found |
Discarded |
5xx |
A status code that begins with "5" in the response code indicates that the server side found itself with an error and cannot proceed with the request |
Discarded |
When the returned status code is 5XX, on behalf of the application Server error, with simple discard processing can be resolved.
About HTTP status Codes