Referencia de Códigos HTTP

Referencia completa de códigos de estado HTTP del 1xx al 5xx con significado, uso típico y ejemplos. Búsqueda rápida por código o palabra clave.

1xx 信息

100
Continue

客户端可以继续发送请求体

101
Switching Protocols

服务器同意切换协议(如 WebSocket 升级)

102
Processing

服务器已接收, 仍在处理(WebDAV)

103
Early Hints

提前返回部分头, 用于资源 preload 提示

2xx 成功

200
OK

请求成功

201
Created

资源创建成功(常用于 POST)

202
Accepted

请求已接受, 但尚未处理完成(异步任务)

204
No Content

成功但无内容返回(DELETE 常用)

206
Partial Content

范围请求成功(断点续传/视频流)

3xx 重定向

301
Moved Permanently

永久重定向, 搜索引擎更新索引

302
Found

临时重定向(早期常被误用)

303
See Other

POST 后跳转到 GET 页面

304
Not Modified

资源未修改, 用缓存(配合 If-Modified-Since)

307
Temporary Redirect

临时重定向, 严格保留方法和 body

308
Permanent Redirect

永久重定向, 严格保留方法和 body

4xx 客户端错误

400
Bad Request

请求格式错误或参数无效

401
Unauthorized

未认证, 需要登录(应叫 Unauthenticated)

403
Forbidden

已认证但无权限访问

404
Not Found

资源不存在

405
Method Not Allowed

资源不支持该 HTTP 方法

408
Request Timeout

请求超时

409
Conflict

资源冲突(如重复创建/版本冲突)

410
Gone

资源已永久删除

413
Payload Too Large

请求体过大

414
URI Too Long

URL 过长

415
Unsupported Media Type

不支持的 Content-Type

422
Unprocessable Entity

语法正确但语义错误(常见于表单校验失败)

425
Too Early

服务器不愿处理可能被重放的请求

429
Too Many Requests

触发限流, 配合 Retry-After 头

451
Unavailable For Legal Reasons

因法律原因不可用

5xx 服务端错误

500
Internal Server Error

服务器异常, 兜底错误

501
Not Implemented

服务器不支持该功能

502
Bad Gateway

网关收到上游无效响应(后端挂了)

503
Service Unavailable

服务暂时不可用(维护/过载)

504
Gateway Timeout

网关等待上游超时

505
HTTP Version Not Supported

HTTP 版本不支持

507
Insufficient Storage

服务器存储不足

Herramientas para Desarrolladores · Herramientas relacionadas