101 Switch Protocol Upgrade the protocol, such as from http to ws Example: 101 200 OK Indicates that the resource request was successful Example:
201 Created Resource creation is successful, mostly used for POST requests 204 No Content The response will not return the Body, generally due to the following two situations
Example 1: Nuggets sets the status code for Options request to 204 Nuggets sets the status code for Options requests to 204 Example 2: Zhihu sets the status code for the Delete request to 204. The following request is to unfollow Nuggets sets the status code for Delete requests to 204 Example 3: When you are reading a joke on Zhihu, you might as well open the console and find a status code of 204
206 Partial Content When the requested multimedia data is large, it will be transmitted in segments. When you watch a video on Bilibili and open the developer tools, you will find many 206 status codes and response headers Content-Range. Example: The status code of the video resource request on Station B is 206 301 Moved Permanently Permanent redirection. 301 is sometimes used when http is redirected to https, such as Bilibili.
302 Found Temporary redirection. 302 is sometimes used when http is redirected to https, such as Zhihu
304 Not Modified The resource has been cached, and the relevant response headers are:
Generally used for resources without hash, such as index.html. Since there are too many examples, I will not give them here. 307 Temporary Redirect Temporary redirection. It can also be used as a redirect from http to https. Another use is HSTS. When Google Chrome finds that a certain http resource has been added to the HSTS list, the browser will redirect via 307. Example: HSTS for Shanyue's personal blog 307 in Stackoverflow What is the difference between http status codes 301, 302 and 307?
400 Bad Request Can be used for API parameter verification 401 Unauthorized When an unauthorized user requests a resource that requires authorization, a 401 error message will be returned. Trying again with the correct authorization credentials can resolve the issue. When Zhihu login fails 403 Forbidden I just don't want you to have access, regardless of whether your credentials are correct! In summary, a 401 Unauthorized response should be used for missing or bad authentication, and a 403 Forbidden response should be used afterwards, when the user is authenticated but isn't authorized to perform the requested operation on the given resource.
404 Not Found Resource not found 405 Method Not Allowed I need to POST this resource, you go to GET hammer 413 Payload Too Large Don't throw such a big body at me, I can't handle it 418 I'm A Teapot I am a teapot I throw coffee and you throw me a teapot? It can also be used to handle illegal parameter validation. I wanted a string, but you gave me an integer? 422 Unprocessable Entity Often used to handle illegal parameter verification. When liking a project on Github, if you intentionally set an incorrect parameter name, the status code 422 will be returned. 422 500 Internal Server Error An internal error occurred on the server. It is very likely that the application layer did not catch the error and caused the entire service to crash. 502 Bad Gateway Gateway timeout, common on Nginx, a response was returned from the upstream application layer 503 Service Unavailable The service is busy due to heavy traffic. Please wait a moment and it may be available again. 504 Gateway Timeout The gateway timed out and the upstream application layer did not respond. This article is reprinted from the WeChat public account "Full Stack Growth Road", which can be followed through the following QR code. To reprint this article, please contact the Full Stack Growth Road public account. |
<<: SASE vs. SD-WAN: Which one do you pick?
>>: An article to help you understand HTML5 MathML
[[188850]] The educational information of ordinar...
By using a handy network troubleshooting app, you...
Overview In the past period of time, containers h...
At the launch ceremony of China Mobile's 2021...
Intranet is the implementation of Internet techno...
Author: Lu Yingchuan, unit: China Mobile Smart Ho...
Last month we shared information about VPS hosts ...
Sharktech is an old computer room established in ...
On January 10, Miao Wei, Minister of Industry and...
5G technology is revolutionizing the way we commu...
LiteServer is a foreign hosting company founded i...
In IT operation and maintenance, data backup is v...
The 5G era is coming. How does the industry view ...
The global 5G progress forecast released by Credi...
Recently, the delayed 5G spectrum auction in Indi...