> For the complete documentation index, see [llms.txt](https://jupiter-1992.gitbook.io/jupiter-note/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jupiter-1992.gitbook.io/jupiter-note/hou-duan/li-lun-gai-nian/07http-zhuang-tai-ma-xiang-jie.md).

# 07 HTTP 状态码详解

![HTTP 状态码详解](https://raw.githubusercontent.com/chanshiyucx/yoi/master/2019/HTTP-状态码详解/HTTP_状态码详解.jpg)

## 状态码的分类

HTTP 状态码共分为 5 种类型：

| 分类    | 分类描述                    |
| ----- | ----------------------- |
| `1**` | 信息，服务器收到请求，需要请求者继续执行操作  |
| `2**` | 成功，操作被成功接收并处理           |
| `3**` | 重定向，需要进一步的操作以完成请求       |
| `4**` | 客户端错误，请求包含语法错误或无法完成请求   |
| `5**` | 服务器错误，服务器在处理请求的过程中发生了错误 |

## 状态码表

| 状态码      | 状态码英文名称                       | 中文描述                                                |
| -------- | ----------------------------- | --------------------------------------------------- |
| 1 开头的状态码 |                               |                                                     |
| 100      | Continue                      | 继续。客户端应继续其请求                                        |
| 101      | Switching Protocols           | 切换协议。服务器根据客户端的请求切换协议。只能切换到更高级的协议，例如，切换到 HTTP 的新版本协议 |
| 2 开头的状态码 |                               |                                                     |
| 200      | OK                            | 请求成功。一般用于 GET 与 POST 请求                             |
| 201      | Created                       | 已创建。成功请求并创建了新的资源                                    |
| 202      | Accepted                      | 已接受。已经接受请求，但未处理完成                                   |
| 203      | Non-Authoritative Information | 非授权信息。请求成功。但返回的 meta 信息不在原始的服务器，而是一个副本              |
| 204      | No Content                    | 无内容。服务器成功处理，但未返回内容。在未更新网页的情况下，可确保浏览器继续显示当前文档        |
| 205      | Reset Content                 | 重置内容。服务器处理成功，浏览器应重置文档视图。可通过此返回码清除浏览器的表单域            |
| 206      | Partial Content               | 部分内容。服务器成功处理了部分 GET 请求                              |
| 3 开头的状态码 |                               |                                                     |
| 300      | Multiple Choices              | 多种选择。请求的资源可包括多个位置，相应可返回一个资源特征与地址的列表用于浏览器选择          |
| 301      | Moved Permanently             | 永久移动。请求的资源已被永久的移动到新 URI                             |
| 302      | Found                         | 临时移动。与 301 类似。但资源只是临时被移动。客户端应继续使用原有 URI             |
| 303      | See Other                     | 查看其它地址。与 301 类似。使用 GET 和 POST 请求查看                  |
| 304      | Not Modified                  | 未修改。所请求的资源未修改，服务器返回此状态码时，不会返回任何资源                   |
| 305      | Use Proxy                     | 使用代理。所请求的资源必须通过代理访问                                 |
| 306      | Unused                        | 已经被废弃的 HTTP 状态码                                     |
| 307      | Temporary Redirect            | 临时重定向。与 302 类似。使用 GET 请求重定向                         |
| 4 开头的状态码 |                               |                                                     |
| 400      | Bad Request                   | 客户端请求的语法错误，服务器无法理解                                  |
| 401      | Unauthorized                  | 请求要求用户的身份认证                                         |
| 403      | Forbidden                     | 服务器理解请求客户端的请求，但是拒绝执行此请求                             |
| 404      | Not Found                     | 服务器无法根据客户端的请求找到资源                                   |
| 405      | Method Not Allowed            | 客户端请求中的方法被禁止                                        |
| 406      | Not Acceptable                | 服务器无法根据客户端请求的内容特性完成请求                               |
| 407      | Proxy Authentication Required | 请求要求代理的身份认证，与 401 类似，但请求者应当使用代理进行授权                 |
| 408      | Request Time-out              | 服务器等待客户端发送的请求时间过长，超时                                |
| 409      | Conflict                      | 服务器完成客户端的 PUT 请求是可能返回此代码，服务器处理请求时发生了冲突              |
| 410      | Gone                          | 客户端请求的资源已经不存在                                       |
| 411      | Length Required               | 服务器无法处理客户端发送的不带 Content-Length 的请求信息                |
| 412      | Precondition Failed           | 客户端请求信息的先决条件错误                                      |
| 413      | Request Entity Too Large      | 由于请求的实体过大，服务器无法处理，因此拒绝请求                            |
| 414      | Request-URI Too Large         | 请求的 URI 过长（URI 通常为网址），服务器无法处理                       |
| 415      | Unsupported Media Type        | 服务器无法处理请求附带的媒体格式                                    |
| 5 开头的状态码 |                               |                                                     |
| 500      | Internal Server Error         | 服务器内部错误，无法完成请求                                      |
| 501      | Not Implemented               | 服务器不支持请求的功能，无法完成请求                                  |
| 502      | Bad Gateway                   | 充当网关或代理的服务器，从远端服务器接收到了一个无效的请求                       |
| 503      | Service Unavailable           | 由于超载或系统维护，服务器暂时的无法处理客户端的请求                          |
| 504      | Gateway Time-out              | 充当网关或代理的服务器，未及时从远端服务器获取请求                           |
| 505      | HTTP Version not supported    | 服务器不支持请求的 HTTP 协议的版本，无法完成处理                         |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jupiter-1992.gitbook.io/jupiter-note/hou-duan/li-lun-gai-nian/07http-zhuang-tai-ma-xiang-jie.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
