HTTP Status Codes Cheatsheet - HTTP Response Status Code Reference

All essential HTTP Status Codes commands organized by use case, with 38+ entries you can copy and run directly. Find the right command fast when you need it.

Reference·38 commands·Last updated 2026-07-21
Back to Reference

1xx Informational 2

100 Continue
客户端应继续发送request体,常用于大上传前的预检
101 Switching Protocols
协议切换,WebSocket Upgrade握手时返回

2xx Success 5

200 OK
request成功,GET 返回资源,PUT/PATCH 返回Update结果
201 Created
资源Create成功,POST request后返回,Location 头指向新资源
202 Accepted
request已接收但未处理完,asynctask/queue处理时返回
204 No Content
成功但无response体,DELETE request常用
206 Partial Content
范围request成功,断点续传 / 视频拖拽时返回

3xx Redirection 6

301 Moved Permanently
永久redirect,SEO 权重转移,HTTP→HTTPS Jump转用
302 Found
临时redirect,不转移权重
303 See Other
redirect用 GET Get,PRG 模式(表单提交后Jump转)
304 Not Modified
资源未修改,用cache,conditionrequest(If-None-Match)命中
307 Temporary Redirect
临时redirect,保持requestmethod不变(302 可能改 POST 为 GET)
308 Permanent Redirect
永久redirect,保持requestmethod不变

4xx Client Error 17

400 Bad Request
request语法错误,如 JSON 格式不合法、缺少requiredOptions
401 Unauthorized
未认证,缺少or无效的 Token/Cookie,需登录
403 Forbidden
已认证但无Permission,如普通User访问管理interface
404 Not Found
资源不exists,URL 路径错误or资源已Delete
405 Method Not Allowed
requestmethod不允许,如对只supports GET 的interface发 POST
406 Not Acceptable
request的 Accept 头无法满足,内容协商无可用格式
408 Request Timeout
requesttimeout,客户端未在规scheduled间内发送完request
409 Conflict
资源冲突,如重复Create、concurrency修改
410 Gone
资源已永久Delete,SEO 中告知爬虫不再index(比 404 更明确)
413 Payload Too Large
request体过大,Nginx client_max_body_size 限制
415 Unsupported Media Type
不supports的 Content-Type,如interface要 JSON 却发 form
418 I'm a teapot
愚人节彩蛋(RFC 2324),茶壶不能煮咖啡
422 Unprocessable Entity
语义错误,如field格式对但值非法,Rails API 校验失败常用
426 Upgrade Required
要求客户端Upgrade协议,如force TLS or HTTP/2
429 Too Many Requests
request频率超限,限流触发(如 Nginx limit_req)
431 Request Header Fields Too Large
request头过大,如 Cookie 过多,需清理or调大头限制
451 Unavailable For Legal Reasons
因法律原因不可用,如内容审查、DMCA 下架

5xx Server Error 8

500 Internal Server Error
Service端内部错误,代码exception、空指针
501 Not Implemented
Service器不supports该requestmethod
502 Bad Gateway
网关收到上游无效response,Nginx 连不上后端or后端崩溃
503 Service Unavailable
Service不可用,过载、维护中or限流,Retry-After 头prompt重试时间
504 Gateway Timeout
网关await上游timeout,Nginx proxy_read_timeout 超限
505 HTTP Version Not Supported
不supports HTTP 协议版本
507 Insufficient Storage
存储空间不足,WebDAV Write失败时返回
511 Network Authentication Required
需Network认证,公共 WiFi 登录页场景

💡 Tips

  • 502 vs 504:502 是后端返回了无效响应(崩溃/拒绝连接),504 是后端连接成功但响应超时。
  • 401 vs 403:401 是"你是谁"(未认证),403 是"你不能做"(已认证但无权限)。
  • Nginx 413 解决:调大 client_max_body_size;429 解决:检查 limit_req 限流配置。

Official References

Commands are compiled from the official docs below. Click to verify the latest usage.

Maintained by LaoHand

Publicly updated on Jul 21, 2026, continuously proofread against official docs.

Found an error? Report it

Wrong command or description? Open an issue to help us fix it.

Found an error? Report it