HTTP status codes

HTTP status codes

When a browser visits a web page, the browser of the browser sends a request to the server where the web page is located. Before the browser receives and displays the web page, the server where the web page is located will return a server header containing the HTTP status code in response to the browser's request.

HTTP Status Code in English is HTTP Status Code.

The following are common HTTP status codes:

  • 200 - Request succeeded
  • 301 - Resource (web page, etc.) permanently moved to another URL
  • 404 - The requested resource (page, etc.) does not exist
  • 500 - Internal server error

HTTP Status Code Classification

The HTTP status code consists of three decimal numbers. The first decimal number defines the type of the status code, and the last two numbers are not used for classification. There are 5 types of HTTP status codes:

HTTP Status Code Classification
Classification Classification description
1** Information, the server received the request and the requester needs to continue the operation
2** success, the operation was successfully received and processed
3** Redirect, further action required to complete the request
4** Client error, the request contains a syntax error or the request could not be completed
5** Server Error, the server encountered an error while processing the request

List of HTTP status codes:

List of HTTP Status Codes
status code Status code English name Chinese description
100 Continue continue. The client should continue its request
101 Switching Protocols Switch protocols. The server switches protocols according to the client's request. Only switch to a higher level protocol, e.g. to a newer version of HTTP
 
200 OK The request was successful. Generally used for GET and POST requests
201 Created created. Successfully requested and created a new resource
202 Accepted accepted. The request has been accepted but not completed
203 Non-Authoritative Information Unauthorized Information. The request was successful. But the returned meta information is not on the original server, but a copy
204 No Content No content. The server processed successfully, but returned no content. Ensures the browser continues to display the current document without updating the web page
205 Reset Content Reset content. The server process is successful and the user terminal (eg: browser) should reset the document view. The browser's form fields can be cleared with this return code
206 Partial Content Part. The server successfully processed part of the GET request
 
300 Multiple Choices multiple choices. The requested resource can include multiple locations, and accordingly a list of resource characteristics and addresses can be returned for user terminal (eg: browser) selection
301 Moved Permanently Move permanently. The requested resource has been permanently moved to the new URI, the returned information will include the new URI, and the browser will be automatically directed to the new URI. Any new requests in the future should use the new URI instead
302 Found Temporary move. Similar to 301. But the resource is only moved temporarily. Clients should continue to use the original URI
303 See Other Check out other addresses. Similar to 301. View using GET and POST requests
304 Not Modified Unmodified. The requested resource has not been modified, and no resource will be returned when the server returns this status code. Clients typically cache visited resources, by providing a header indicating that the client wishes to return only resources modified after a specified date
305 Use Proxy Use a proxy. The requested resource must be accessed through a proxy
306 Unused Obsolete HTTP status codes
307 Temporary Redirect Temporary redirect. Similar to 302. Redirect with GET request
 
400 Bad Request The client request has a syntax error that the server cannot understand
401 Unauthorized Request requires user authentication
402 Payment Required reserved for future use
403 Forbidden The server understands the request of the requesting client, but refuses to execute the request
404 Not Found The server could not find the resource (web page) based on the client's request. With this code, web designers can set up a personalized page that says "the resource you requested could not be found"
405 Method Not Allowed method in client request is forbidden
406 Not Acceptable The server cannot fulfill the request based on the content characteristics of the client request
407 Proxy Authentication Required The request requires proxy authentication, similar to 401, but the requester should use the proxy for authorization
408 Request Time-out The server waits too long for the request sent by the client and times out
409 Conflict 服务器完成客户端的PUT请求是可能返回此代码,服务器处理请求时发生了冲突
410 Gone 客户端请求的资源已经不存在。410不同于404,如果资源以前有现在被永久删除了可使用410代码,网站设计人员可通过301代码指定资源的新位置
411 Length Required 服务器无法处理客户端发送的不带Content-Length的请求信息
412 Precondition Failed 客户端请求信息的先决条件错误
413 Request Entity Too Large 由于请求的实体过大,服务器无法处理,因此拒绝请求。为防止客户端的连续请求,服务器可能会关闭连接。如果只是服务器暂时无法处理,则会包含一个Retry-After的响应信息
414 Request-URI Too Large 请求的URI过长(URI通常为网址),服务器无法处理
415 Unsupported Media Type 服务器无法处理请求附带的媒体格式
416 Requested range not satisfiable 客户端请求的范围无效
417 Expectation Failed 服务器无法满足Expect的请求头信息
 
500 Internal Server Error 服务器内部错误,无法完成请求
501 Not Implemented 服务器不支持请求的功能,无法完成请求
502 Bad Gateway 充当网关或代理的服务器,从远端服务器接收到了一个无效的请求
503 Service Unavailable 由于超载或系统维护,服务器暂时的无法处理客户端的请求。延时的长度可包含在服务器的Retry-After头信息中
504 Gateway Time-out 充当网关或代理的服务器,未及时从远端服务器获取请求
505 HTTP Version not supported 服务器不支持请求的HTTP协议的版本,无法完成处理

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325872904&siteId=291194637