# Response Code

### I. 1xx: Informational

Indicates that the request has been received and is being processed. These status codes are rarely used directly in business scenarios.

| Status Code | Name                | Meaning                                          |
| ----------- | ------------------- | ------------------------------------------------ |
| 100         | Continue            | The client can continue sending the request body |
| 101         | Switching Protocols | Protocol switching (e.g., HTTP → WebSocket)      |
| 102         | Processing          | Server is processing the request (WebDAV)        |

Common scenarios: WebSocket, HTTP Upgrade

### II. 2xx: Success

Indicates that the request has been successfully processed.

| Status Code | Name            | Meaning                                    |
| ----------- | --------------- | ------------------------------------------ |
| 200         | OK              | Request succeeded                          |
| 201         | Created         | Resource successfully created (POST)       |
| 202         | Accepted        | Request accepted, processed asynchronously |
| 204         | No Content      | Success with no response body              |
| 206         | Partial Content | Partial content or breakpoint download     |

Common scenarios: Normal API responses, file downloads, successful proxy forwarding

### III. 3xx: Redirection

Indicates that further action is required to complete the request.

| Status Code | Name               | Meaning                               |
| ----------- | ------------------ | ------------------------------------- |
| 301         | Moved Permanently  | Permanent redirection                 |
| 302         | Found              | Temporary redirection                 |
| 303         | See Other          | Redirect to GET                       |
| 304         | Not Modified       | Cache is still valid                  |
| 307         | Temporary Redirect | Temporary redirect (method unchanged) |
| 308         | Permanent Redirect | Permanent redirect (method unchanged) |

Common scenarios: CDN, HTTP → HTTPS redirection, cache control

### IV. 4xx: Client Error

Indicates that there is a problem with the request.

| Status Code | Name               | Meaning                           |
| ----------- | ------------------ | --------------------------------- |
| 400         | Bad Request        | Invalid request format            |
| 401         | Unauthorized       | Not authenticated (missing token) |
| 403         | Forbidden          | Authenticated but no permission   |
| 404         | Not Found          | Resource does not exist           |
| 405         | Method Not Allowed | Method not supported              |
| 408         | Request Timeout    | Request timed out                 |
| 409         | Conflict           | Resource conflict                 |
| 413         | Payload Too Large  | Request body too large            |
| 414         | URI Too Long       | URL too long                      |
| 429         | Too Many Requests  | Rate limited                      |

● 401 / 403: Authentication failure\
● 404: Target server does not exist\
● 429: IP or user rate limiting

### V. 5xx: Server Error

Indicates that the server failed to process the request.

| Status Code | Name                  | Meaning                 |
| ----------- | --------------------- | ----------------------- |
| 500         | Internal Server Error | Internal server error   |
| 502         | Bad Gateway           | Invalid upstream server |
| 503         | Service Unavailable   | Service unavailable     |
| 504         | Gateway Timeout       | Upstream timeout        |
| 507         | Insufficient Storage  | Insufficient storage    |
