本文描述了常用的Http响应状态,后面用英文写,但我的英文不太好,如有错误之处,希望大家帮我纠正,我的联系方式在后面。
24Please respect copyright.PENANAbr6c9dzM4Q
Section A. Most Often Used
200 OK24Please respect copyright.PENANAywYyC8WAnT
The request succeeded.
206 Partial Content24Please respect copyright.PENANA3ELsd640M0
This response code is used in response to a range request when the client has requested a part or parts of a resource.
304 Not Modified24Please respect copyright.PENANALFqBqHS4P5
This is used for caching purposes. It tells the client that the response has not been modified, so the client can continue to use the same cached version of the response.
400 Bad Request24Please respect copyright.PENANAa3g5ue9RNf
The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
401 Unauthorized24Please respect copyright.PENANAQQWDWdIr2l
Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
403 Forbidden24Please respect copyright.PENANAFvg3x3TKG5
The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.
404 Not Found24Please respect copyright.PENANAXZfx9SFqCd
The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.
411 Length Required24Please respect copyright.PENANAPra0zHtvGj
Server rejected the request because the Content-Length header field is not defined and the server requires it.
413 Content Too Large24Please respect copyright.PENANABJDu0tsFQ1
The request body is larger than limits defined by server. The server might close the connection or return an Retry-After header field.
414 URI Too Long24Please respect copyright.PENANALyZ8Jrkba4
The URI requested by the client is longer than the server is willing to interpret.
416 Range Not Satisfiable24Please respect copyright.PENANAxYZeUrwmRs
The ranges specified by the Range header field in the request cannot be fulfilled. It's possible that the range is outside the size of the target resource's data.
431 Request Header Fields Too Large24Please respect copyright.PENANAKKrIyp0ukD
The server is unwilling to process the request because its header fields are too large. The request may be resubmitted after reducing the size of the request header fields.
500 Internal Server Error24Please respect copyright.PENANAJqw3SPfg98
The server has encountered a situation it does not know how to handle. This error is generic, indicating that the server cannot find a more appropriate 5XX status code to respond with.
505 HTTP Version Not Supported24Please respect copyright.PENANAjKxHCZqhPc
The HTTP version used in the request is not supported by the server.
Section B. Sometimes Used
101 Switching Protocols24Please respect copyright.PENANAZMdCqLUDka
This code is sent in response to an Upgrade request header from the client and indicates the protocol the server is switching to.
301 Moved Permanently24Please respect copyright.PENANAND7nUWOi7c
The URL of the requested resource has been changed permanently. The new URL is given in the response.
308 Permanent Redirect24Please respect copyright.PENANAS9KdCYcK3E
This means that the resource is now permanently located at another URI, specified by the Location response header. This has the same semantics as the 301 Moved Permanently HTTP response code, with the exception that the user agent must not change the HTTP method used: if a POST was used in the first request, a POST must be used in the second request.
412 Precondition Failed24Please respect copyright.PENANAc9TptKi1aU
In conditional requests, the client has indicated preconditions in its headers which the server does not meet.
417 Expectation Failed24Please respect copyright.PENANAmvGIjtMOLN
This response code means the expectation indicated by the Expect request header field cannot be met by the server.
426 Upgrade Required24Please respect copyright.PENANAjmqBq2kpcC
The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. The server sends an Upgrade header in a 426 response to indicate the required protocol(s).
428 Precondition Required24Please respect copyright.PENANAE3cknmKvei
The origin server requires the request to be conditional. This response is intended to prevent the 'lost update' problem, where a client GETs a resource's state, modifies it and PUTs it back to the server, when meanwhile a third party has modified the state on the server, leading to a conflict.
503 Service Unavailable24Please respect copyright.PENANAQDeWMRK5ep
The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded. Note that together with this response, a user-friendly page explaining the problem should be sent. This response should be used for temporary conditions and the Retry-After HTTP header should, if possible, contain the estimated time before the recovery of the service. The webmaster must also take care about the caching-related headers that are sent along with this response, as these temporary condition responses should usually not be cached.
Section C. Thanks
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
24Please respect copyright.PENANAMXYXkWycNd
Section D. Contacts Me
If you found any errors or have any suggestions for this article, please let me know, my wechat: si_jinmin, my email: si.jinmin@gmail.com24Please respect copyright.PENANADlOTQGG4GB
如果您发现本文有任何错误,或者对本文有好的建议,欢迎与我联系探讨,我的微信: si_jinmin, 我的email: si.jinmin@gmail.com
如果您對C/C++ programming, Linux, website development, Vue, Git, vscode感興趣,邀請您加入「Linux/C/C++ Website Development」 微信群,請加我的微信(si_jinmin)以便拉您进群。
ns 15.158.61.46da2