The resource which authentication is required and not yet been provided (or failed).
402
需要支付信息(Payment Required)
为以后使用保留。通常用于需要提供支付的场景,如数字钞票或在线支付。一个例子是:Google 开发者 API 使用 402 状态来表示超过了每日请求上限的情况
Reserved for future use. Might be used as part of some form of digital cash or micropayment scheme, but that has not yet happened.
403
禁止访问(Forbidden)
服务器已收到请求,但拒绝提供服务。出现此状态通常是因为请求者没有足够的权限访问请求的资源
The request contained valid data and was understood by the server, but the server is refusing action. This may be due to the user not having the necessary permissions for a resource or needing an account of some sort, or attempting a prohibited action.
404
未找到(Not Found)
服务器找不到请求的网页或资源
The requested resource could not be found but may be available in the future.
405
不支持的请求方法(Method Not Allowed)
服务器不支持当前请求方法。比如:某些资源只支持 GET 和 POST 请求,如果发起 HEAD 请求,服务器将返回该状态
A request method is not supported for the requested resource.
406
不被接受(Not Acceptable)
服务器无法使用请求的内容特性响应请求的网页,即:不支持请求头部中 Accept 字段对应的内容
The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.
407
需要代理授权(Proxy Authentication Required)
此状态代码与 401(未授权)类似,但指定请求者应当授权使用代理
The client must first authenticate itself with the proxy.
408
请求超时(Request Timeout)
服务器等候请求时发生超时
The server timed out waiting for the request.
409
请求冲突(Conflict)
服务器在完成请求时发生冲突。服务器必须在响应中包含有关冲突的信息
Indicates that the request could not be processed because of conflict in the current state of the resource.
410
已删除(Gone)
如果请求的资源已永久删除,服务器就会返回此响应
Indicates that the resource requested is no longer available and will not be available again.
411
需要有效长度(Length Required)
服务器无法处理不含有内容长度标头字段(Content-Length)的请求
The request did not specify the length of its content, which is required by the requested resource.
412
未满足前提条件(Precondition Failed)
服务器未满足请求者在请求中设置的其中一个前提条件
The server does not meet one of the preconditions that the requester put on the request header fields.
413
请求实体过大(Payload Too Large)
服务器无法处理请求,因为请求实体过大,超出服务器的处理能力
The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".
414
请求的 URI 过长(URI Too Long)
请求的 URI(通常为网址)过长,服务器无法处理
The URI provided was too long for the server to process. Called "Request-URI Too Long" previously.
415
不支持的媒体类型(Unsupported Media Type)
服务器不支持请求的内容格式(Content-Type)
The request entity has a media type which the server or resource does not support.
416
请求范围不符合要求(Range Not Satisfiable)
客户端请求服务器资源的某一部分,但服务器不能提供该部分内容时,则会返回此状态码
The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.
417
未满足期望值(Expectation Failed)
服务器不能满足 "Expection" 请求头部的要求时返回该状态码
The server cannot meet the requirements of the Expect request-header field.
421
地址错误的请求(Misdirected Request)
当请求被定向到一个不能输出响应的服务器时,则会返回该状态
The request was directed at a server that is not able to produce a response.
422
无法处理的实体(Unprocessable Entity)
请求格式正确,但由于语义错误,导致无法响应请求
The request was well-formed but was unable to be followed due to semantic errors.
423
被锁定(Locked)
正在访问的资源已被锁定
The resource that is being accessed is locked.
424
依赖请求失败(Failed Dependency)
由于之前的某个请求(即依赖的请求)发生错误,导致当前请求失败
The request failed because it depended on another request and that request failed.