最常用
200 – 请求成功
301 – 资源(网页等)被永久转移到其它URL
404 – 请求的资源(网页等)不存在
500 – 内部服务器错误
200 OK 请求正常处理完毕
204 No Content 请求成功处理,没有实体的主体返回
301 Moved Permanently 永久重定向,资源已永久分配新URI
302 Found 临时重定向,资源已临时分配新URI
400 Bad Request 请求报文语法错误或参数错误
401 Unauthorized 要通过HTTP认证,或认证失败
403 Forbidden 请求资源被拒绝
404 Not Found 无法找到请求资源(服务器无理由拒绝)
500 Internal Server Error 服务器故障或Web应用故障
503 Service Unavailable 服务器超负载或停机维护
分类描述
1**信息,服务器收到请求(正在处理),需要请求者继续执行操作
2**成功,操作被成功接收并处理
3**重定向,需要进一步的操作以完成请求(需要额外操作)
4**客户端错误,请求包含语法错误或无法完成请求
5**服务器错误,服务器在处理请求的过程中发生了错误
java的所有状态
public enum HttpStatus {
CONTINUE ( 100 , "Continue 继续" ) ,
SWITCHING_PROTOCOLS ( 101 , "Switching Protocols交换协议" ) ,
PROCESSING ( 102 , "Processing加工" ) ,
CHECKPOINT ( 103 , "Checkpoint检查点" ) ,
OK ( 200 , "OK 好" ) ,
CREATED ( 201 , "Created 创建" ) ,
ACCEPTED ( 202 , "Accepted 接受 任何 同意" ) ,
NON_AUTHORITATIVE_INFORMATION ( 203 , "Non-Authoritative Information 非授权信息" ) ,
NO_CONTENT ( 204 , "No Content 无内容" ) ,
RESET_CONTENT ( 205 , "Reset Content 重置内容" ) ,
PARTIAL_CONTENT ( 206 , "Partial Content 部分内容" ) ,
MULTI_STATUS ( 207 , "Multi-Status 多状态" ) ,
ALREADY_REPORTED ( 208 , "Already Reported 已经报道" ) ,
IM_USED ( 226 , "IM Used 我使用" ) ,
MULTIPLE_CHOICES ( 300 , "Multiple Choices 多个选择" ) ,
MOVED_PERMANENTLY ( 301 , "Moved Permanently 搬到永久" ) ,
FOUND ( 302 , "Found 发现" ) ,
@Deprecated
MOVED_TEMPORARILY ( 302 , "Moved Temporarily 临时移动" ) ,
SEE_OTHER ( 303 , "See Other 看到其他" ) ,
NOT_MODIFIED ( 304 , "Not Modified 不修改" ) ,
@Deprecated
USE_PROXY ( 305 , "Use Proxy 使用代理" ) ,
TEMPORARY_REDIRECT ( 307 , "Temporary Redirect 临时重定向" ) ,
PERMANENT_REDIRECT ( 308 , "Permanent Redirect 永久重定向" ) ,
BAD_REQUEST ( 400 , "Bad Request 错误请求" ) ,
UNAUTHORIZED ( 401 , "Unauthorized 未经许可" ) ,
PAYMENT_REQUIRED ( 402 , "Payment Required 付款要求" ) ,
FORBIDDEN ( 403 , "Forbidden Forbidden" ) ,
NOT_FOUND ( 404 , "Not Found 未发现" ) ,
METHOD_NOT_ALLOWED ( 405 , "Method Not Allowed 方法不允许" ) ,
NOT_ACCEPTABLE ( 406 , "Not Acceptable 不接受的" ) ,
PROXY_AUTHENTICATION_REQUIRED ( 407 , "Proxy Authentication Required 代理身份验证要求" ) ,
REQUEST_TIMEOUT ( 408 , "Request Timeout 请求超时" ) ,
CONFLICT ( 409 , "Conflict 冲突" ) ,
GONE ( 410 , "Gone 离去的;死去的" ) ,
LENGTH_REQUIRED ( 411 , "Length Required 长度要求" ) ,
PRECONDITION_FAILED ( 412 , "Precondition Failed 失败的前提" ) ,
PAYLOAD_TOO_LARGE ( 413 , "Payload Too Large 负荷太大" ) ,
@Deprecated
REQUEST_ENTITY_TOO_LARGE ( 413 , "Request Entity Too Large 请求实体太大" ) ,
URI_TOO_LONG ( 414 , "URI Too Long rui太长" ) ,
@Deprecated
REQUEST_URI_TOO_LONG ( 414 , "Request-URI Too Long 请求uri太长" ) ,
UNSUPPORTED_MEDIA_TYPE ( 415 , "Unsupported Media Type 不支持的媒体类型" ) ,
REQUESTED_RANGE_NOT_SATISFIABLE ( 416 , "Requested range not satisfiable 要求的范围不能满足" ) ,
EXPECTATION_FAILED ( 417 , "Expectation Failed 期望失败" ) ,
I_AM_A_TEAPOT ( 418 , "I'm a teapot 我是一个茶壶" ) ,
@Deprecated
INSUFFICIENT_SPACE_ON_RESOURCE ( 419 , "Insufficient Space On Resource 资源空间不足" ) ,
@Deprecated
METHOD_FAILURE ( 420 , "Method Failure 方式失败" ) ,
@Deprecated
DESTINATION_LOCKED ( 421 , "Destination Locked 目标锁定" ) ,
UNPROCESSABLE_ENTITY ( 422 , "Unprocessable Entity 无法处理的实体" ) ,
LOCKED ( 423 , "Locked 锁住的" ) ,
FAILED_DEPENDENCY ( 424 , "Failed Dependency 失败的依赖" ) ,
TOO_EARLY ( 425 , "Too Early 太早" ) ,
UPGRADE_REQUIRED ( 426 , "Upgrade Required 升级需要" ) ,
PRECONDITION_REQUIRED ( 428 , "Precondition Required 先决条件要求" ) ,
TOO_MANY_REQUESTS ( 429 , "Too Many Requests 太多请求" ) ,
REQUEST_HEADER_FIELDS_TOO_LARGE ( 431 , "Request Header Fields Too Large 请求头字段太大" ) ,
UNAVAILABLE_FOR_LEGAL_REASONS ( 451 , "Unavailable For Legal Reasons 由于法律原因无法使用" ) ,
INTERNAL_SERVER_ERROR ( 500 , "Internal Server Error 内部服务器错误" ) ,
NOT_IMPLEMENTED ( 501 , "Not Implemented 不可执行" ) ,
BAD_GATEWAY ( 502 , "Bad Gateway 错误网关;无效网关" ) ,
SERVICE_UNAVAILABLE ( 503 , "Service Unavailable 服务无效;无法提供服务" ) ,
GATEWAY_TIMEOUT ( 504 , "Gateway Timeout 网关超时" ) ,
HTTP_VERSION_NOT_SUPPORTED ( 505 , "HTTP Version not supported 版本不支持" ) ,
VARIANT_ALSO_NEGOTIATES ( 506 , "Variant Also Negotiates 变体也协商" ) ,
INSUFFICIENT_STORAGE ( 507 , "Insufficient Storage 存储不足" ) ,
LOOP_DETECTED ( 508 , "Loop Detected 循环检测" ) ,
BANDWIDTH_LIMIT_EXCEEDED ( 509 , "Bandwidth Limit Exceeded 带宽限制超过" ) ,
NOT_EXTENDED ( 510 , "Not Extended 不延长" ) ,
NETWORK_AUTHENTICATION_REQUIRED ( 511 , "Network Authentication Required 网络身份验证要求" ) ;
}
整理的java中重要的
CONTINUE(100, "Continue 继续"),
OK(200, "OK 好"),
CREATED(201, "Created 创建"),
ACCEPTED(202, "Accepted 接受 任何 同意"),
NON_AUTHORITATIVE_INFORMATION(203, "Non-Authoritative Information 非授权信息"),
NO_CONTENT(204, "No Content 无内容"),
MULTIPLE_CHOICES(300, "Multiple Choices 多个选择"),
MOVED_PERMANENTLY(301, "Moved Permanently 搬到永久 永久重定向"),
FOUND(302, "Found 发现"),
BAD_REQUEST(400, "Bad Request 错误请求"),
UNAUTHORIZED(401, "Unauthorized 未经许可"),
PAYMENT_REQUIRED(402, "Payment Required 付款要求"),
FORBIDDEN(403, "Forbidden Forbidden"),
NOT_FOUND(404, "Not Found 未发现"),
METHOD_NOT_ALLOWED(405, "Method Not Allowed 方法不允许"),
INTERNAL_SERVER_ERROR(500, "Internal Server Error 内部服务器错误"),
NOT_IMPLEMENTED(501, "Not Implemented 不可执行"),
BAD_GATEWAY(502, "Bad Gateway 错误网关;无效网关"),
SERVICE_UNAVAILABLE(503, "Service Unavailable 服务无效;无法提供服务"),
GATEWAY_TIMEOUT(504, "Gateway Timeout 网关超时"),