状态码类别
状态码 | 类别 |
---|---|
1xx | Informational(信息性状态码) |
2xx | Success(成功状态码) |
3xx | Redirection(重定向状态码) |
4xx | Client Error(客户端错误状态码) |
5xx | Server Error(服务器错误状态码) |
常见状态码
2XX–表明请求被正常处理了
- 200 OK:请求已正常处理
4XX–表明客户端是发生错误的原因所在
- 400 Bad Request:服务器端无法理解客户端发送的请求
- 401 Unauthorized:发送的请求需要有同感HTTP认证的认证信息
- 403 Forbidden:无权访问资源
- 404 Not Found:服务器上没有请求的资源
- 405 Method Not Allowed:客户端请求中的方法被禁止
5XX–服务器本身发生错误
- 500 Internal Server Error:内部资源出故障
- 502 Bad Gateway:错误网关
- 503 Service Unavailable:服务器忙
- 504 Gateway Time-out:连接超时
- 505 HTTP Version not supported:不支持请求的HTTP协议版本