For our front-end friends, can know more about the status code specification, or to deal with some interface problems, it is very helpful.

Have you seen that my titles are 1XX, 2xx and 5XX instead of 3xx and 4XX, because I wrote about them in the previous article? If you want to read them, you can click here “3XX Response Status Code Explanation” “4XX Response Status Code Explanation”.

The response status code describes the processing result of the request. The response status code consists of three digits and a status phrase.

The format of the response status code is also regular. The first digit specifies the response category, and the last two digits are not classified. There are five categories of responses

Category reason phrase

1XX Informational The received request is being processed

2XX Success the request is successfully processed

3XX Redirection (Redirection status code) Requires additional operations to complete the request

4XX Client Error The server was unable to process the request

5XX Server Error The Server fails to process the request



1xx server received the request, but has not yet responded to the entity

Common 100

Take a simple example, we have all bought goods on Taobao or JINGdong, but we did not deliver the goods after we paid for them. The status of this order tells us that we are delivering the goods, which is similar to the server status code 100.


2. 2XX succeeded

2.1, 200


Take a simple example, we have all bought goods on Taobao or JINGdong, we have paid the money, and the goods we bought have been transported to our side by express. The status of the order is similar to that of the server response 200

2.2 204 no Content




Take a simple example, in our college hand, some female students want to make extra money, they will make money by brushing taobao or JINGdong, ha ha, brushing is usually we through Taobao or JINGdong to advance the amount of money to the merchant, the merchant will send us an empty package. This operation between the merchant and the customer is much like the 204 response on the server and client.

2.3 206 Partial Content

If you have downloaded large files or videos, you should know this status code. The 206 status code is related to the header field of the request and the header field of the response




Step 1: When the client performs a breakpoint request or a range request, it will encounter this type of status code. For example, I have a video that was halfway downloaded yesterday, I disconnected it for some reason, and I want to download it again today. Range: bytes= ‘50001-10000’ to the server.

Step 2. The server compares the if-match to the ETag of the resource. If the match is consistent, the server returns the part of the resource and the status code 206. If not, the server returns 412.


3. The 5XX server is incorrect

3.1  500 Internal Server Error 

When the client requests the server, the server returns status code 500. There are two kinds of error possibilities: first, the server encountered an error during execution; second, there may be a bug or temporary fault in the Web application


3.2 503 Service Unavailable The Service is Unavailable

The client request to the server, the server finds himself still has a lot of without the use of the processing is completed, overload at work, will give the client said: ‘you first and wait, wait for me five minutes later the business processing play again to seek me,’ this is our common response status code of 503, and will return to retry in response to the first field – after: time