响应码分五种类型,由它们的第一位数字表示:
响应码由三位十进制数字组成,它们出现在由HTTP服务器发送的响应的第一行。
1xx
:信息,请求收到,继续处理2xx
:成功,行为被成功地接受、理解和采纳3xx
:重定向,为了完成请求,必须进一步执行的动作4xx
:客户端错误,请求包含语法错误或者请求无法实现5xx
:服务器错误,服务器不能实现一种明显无效的请求
1×× Informational
100
Continue101
Switching Protocols102
Processing
2×× Success
200
OK201
Created202
Accepted203
Non-authoritative Information204
No Content205
Reset Content206
Partial Content207
Multi-Status208
Already Reported226
IM Used
3×× Redirection
300
Multiple Choices301
Moved Permanently302
Found303
See Other304
Not Modified305
Use Proxy307
Temporary Redirect308
Permanent Redirect
4×× Client Error
400
Bad Request401
Unauthorized402
Payment Required403
Forbidden404
Not Found405
Method Not Allowed406
Not Acceptable407
Proxy Authentication Required408
Request Timeout409
Conflict410
Gone411
Length Required412
Precondition Failed413
Payload Too Large414
Request-URI Too Long415
Unsupported Media Type416
Requested Range Not Satisfiable417
Expectation Failed418
I'm a teapot421
Misdirected Request422
Unprocessable Entity423
Locked424
Failed Dependency426
Upgrade Required428
Precondition Required429
Too Many Requests431
Request Header Fields Too Large444
Connection Closed Without Response451
Unavailable For Legal Reasons499
Client Closed Request
5×× Server Error
500
Internal Server Error501
Not Implemented502
Bad Gateway503
Service Unavailable504
Gateway Timeout505
HTTP Version Not Supported506
Variant Also Negotiates507
Insufficient Storage508
Loop Detected510
Not Extended511
Network Authentication Required599
Network Connect Timeout Error