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.
Back to Reference1xx Informational 2
100 Continue客户端应继续发送request体,常用于大上传前的预检
101 Switching Protocols协议切换,WebSocket Upgrade握手时返回
2xx Success 5
200 OKrequest成功,GET 返回资源,PUT/PATCH 返回Update结果
201 Created资源Create成功,POST request后返回,Location 头指向新资源
202 Acceptedrequest已接收但未处理完,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 Otherredirect用 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 Requestrequest语法错误,如 JSON 格式不合法、缺少requiredOptions
401 Unauthorized未认证,缺少or无效的 Token/Cookie,需登录
403 Forbidden已认证但无Permission,如普通User访问管理interface
404 Not Found资源不exists,URL 路径错误or资源已Delete
405 Method Not Allowedrequestmethod不允许,如对只supports GET 的interface发 POST
406 Not Acceptablerequest的 Accept 头无法满足,内容协商无可用格式
408 Request Timeoutrequesttimeout,客户端未在规scheduled间内发送完request
409 Conflict资源冲突,如重复Create、concurrency修改
410 Gone资源已永久Delete,SEO 中告知爬虫不再index(比 404 更明确)
413 Payload Too Largerequest体过大,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 Requestsrequest频率超限,限流触发(如 Nginx limit_req)
431 Request Header Fields Too Largerequest头过大,如 Cookie 过多,需清理or调大头限制
451 Unavailable For Legal Reasons因法律原因不可用,如内容审查、DMCA 下架
5xx Server Error 8
500 Internal Server ErrorService端内部错误,代码exception、空指针
501 Not ImplementedService器不supports该requestmethod
502 Bad Gateway网关收到上游无效response,Nginx 连不上后端or后端崩溃
503 Service UnavailableService不可用,过载、维护中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