响应码分五种类型,由它们的第一位数字表示:
响应码由三位十进制数字组成,它们出现在由HTTP服务器发送的响应的第一行。
1xx:信息,请求收到,继续处理2xx:成功,行为被成功地接受、理解和采纳3xx:重定向,为了完成请求,必须进一步执行的动作4xx:客户端错误,请求包含语法错误或者请求无法实现5xx:服务器错误,服务器不能实现一种明显无效的请求
1×× Informational
100Continue101Switching Protocols102Processing
2×× Success
200OK201Created202Accepted203Non-authoritative Information204No Content205Reset Content206Partial Content207Multi-Status208Already Reported226IM Used
3×× Redirection
300Multiple Choices301Moved Permanently302Found303See Other304Not Modified305Use Proxy307Temporary Redirect308Permanent Redirect
4×× Client Error
400Bad Request401Unauthorized402Payment Required403Forbidden404Not Found405Method Not Allowed406Not Acceptable407Proxy Authentication Required408Request Timeout409Conflict410Gone411Length Required412Precondition Failed413Payload Too Large414Request-URI Too Long415Unsupported Media Type416Requested Range Not Satisfiable417Expectation Failed418I'm a teapot421Misdirected Request422Unprocessable Entity423Locked424Failed Dependency426Upgrade Required428Precondition Required429Too Many Requests431Request Header Fields Too Large444Connection Closed Without Response451Unavailable For Legal Reasons499Client Closed Request
5×× Server Error
500Internal Server Error501Not Implemented502Bad Gateway503Service Unavailable504Gateway Timeout505HTTP Version Not Supported506Variant Also Negotiates507Insufficient Storage508Loop Detected510Not Extended511Network Authentication Required599Network Connect Timeout Error