This is the 12th day of my participation in the August More Text Challenge. For details, see:August is more challenging
HTTP status code is one of the basic knowledge we need to master in the process of development, and is also a frequent interview questions, this article will explain the meaning of various HTTP status code.
More articles on my Github and personal public number [Whole cliff Road], welcome to watch [front knowledge points], if there is benefit, don’t pay, little hands point a Star.
Read this article
- This section describes HTTP status codes and their classification
- Meaning of HTTP status codes
What is the HTTP status code
- The first behavior status line in the response packet returned by the server contains the status code and the reason phrase to inform the client of the result of the request.
- The first digit specifies the response category, and the last two digits are unclassified. There are five types of response categories
Status code | category | The reason the phrase |
---|---|---|
1XX | Informational status code | The received request is being processed |
2XX | Success status code | The request is processed normally |
3XX | Redirection (Redirection status code) | Additional operations are required to complete the request |
4XX | Client Error status code | The server could not process the request |
5XX | Server Error status code | The server failed to process the request |
Meaning of HTTP status codes
1 xx information
- 100 Continue: Indicates that everything is fine so far and that the client can Continue sending the request or ignore the response.
2 xx success
-
200 OK: The request succeeds.
-
204 No Content: The request has been processed successfully, but the response packet returned does not contain the body of the entity. It is usually used when you only need to send information from the client to the server, but no data needs to be returned.
-
206 Partial Content: Indicates that the client made a scope request. The response packet contains the entity Content in the content-range Range.
3 xx redirection
-
301 Moved to big: Permanent redirection
-
302 Found: Temporary redirection
-
303 See Other: Provides the same functions as 302, but requires the client to use the GET method to obtain resources.
-
Note: Although HTTP does not allow redirects in 301 and 302 states to change POST to GET, most browsers will change POST to GET for redirects in 301, 302 and 303 states.
-
304 Not Modified: If the header of the request packet contains some conditions, for example: If-match, if-modifiedSince, if-none-match, if-range, if-unmodified-since, the server will return the 304 status code If the conditions are not met.
-
307 Temporary Redirect: indicates a Temporary Redirect. It is similar to 302, except that the browser does not change the POST method to GET method.
4XX Client error
-
400 Bad Request: Syntax errors exist in the Request packet.
-
401 Unauthorized: The status code indicates that the request needs authentication information (BASIC authentication and DIGEST authentication). If the request has been made once before, the user authentication fails.
-
403 Forbidden: The request is rejected. There is no need for the server to give a detailed reason for the rejection.
-
404 Not Found: The requested resource could Not be Found. This can also be used when the server rejects the request and does Not want to give a reason
5XX Server error
-
500 Internal Server Error: An Error occurred while the Server was executing a request.
-
503 Service Unavilable: The server is temporarily under load or is down for maintenance and cannot process requests at this time.
Write in the last
If you find this article helpful, please like it and share it with more people who need it!
Welcome to pay attention to [Quanzhendaolu] and wechat public account [Quanzhendaolu], to get more good articles and free books!
There is a need [Baidu] & [bytedance] & [JD] & [ape counselling] within the push, please leave a message oh, you will enjoy the VIP level extreme speed within the push service ~
Past oliver
Wechat JS API payment implementation
Create a personalized Github profile
The interviewer asks you<img>
What elements do you say
Special JS floating point number storage and calculation
Long [word] baidu and good interview after containing the answer | the nuggets technology essay in the future
Front end practical regular expression & tips, all throw you 🏆 nuggets all technical essay | double festival special articles
HTML Tabindex
A few lines of code to teach you to solve wechat poster and TWO-DIMENSIONAL code generation
Vue3.0 Responsive data principle: ES6 Proxy
Read on to make your interviewer fall in love with you
How to draw a fine line gracefully
Front-end performance optimization -HTML, CSS, JS parts
Front-end performance optimization – Page loading speed optimization
Front-end performance optimization – Network transport layer optimization