HTTP 状态码速查

这里汇总接口和 CDN 里最常见的状态码,极少用的实验码未收录。

更新日期:

名称含义
200OKSuccess with body
201CreatedResource created
204No ContentSuccess, empty body
301Moved PermanentlyPermanent redirect
302FoundTemporary redirect
304Not ModifiedUse cached copy
400Bad RequestClient request invalid
401UnauthorizedAuth required / failed
403ForbiddenAuthenticated but denied
404Not FoundNo such resource
405Method Not AllowedWrong HTTP method
408Request TimeoutClient too slow
409ConflictState conflict
410GonePermanently removed
422Unprocessable EntitySemantics invalid
429Too Many RequestsRate limited
500Internal Server ErrorServer fault
502Bad GatewayUpstream invalid
503Service UnavailableOverloaded / down
504Gateway TimeoutUpstream timeout

说明

常见问题

HTTP 403 是什么意思?
403 表示服务器已理解(通常已认证)请求,但拒绝授权访问该资源。与 401 不同,重新登录也无法解决。
HTTP 301 和 302 重定向有什么区别?
301 表示资源永久迁移,客户端和搜索引擎此后应使用新地址;302 是临时重定向,原地址仍然有效。
HTTP 429 是什么意思?怎么解决?
429 表示请求过于频繁,触发了限流。应降低请求频率,并遵循服务器返回的 Retry-After 响应头。