Home > Common Problem > What are the series of http status codes?

What are the series of http status codes?

百草
Release: 2023-10-12 16:25:12
Original
818 people have browsed it

http status code series include 1xx, 2xx, 3xx, 4xx and 5xx series. Detailed introduction: 1. The 1xx series of status codes indicate that the server has received the request, but still needs further processing. These status codes are mainly used to convey some additional information to help the client understand the progress of the request processing. 100 Continue indicates that the server has received the request. to the header of the request, and the client should continue to send the body of the request, 101 Switching Protocols indicates that the server has understood the client's request, etc.

What are the series of http status codes?

The operating system for this tutorial: Windows 10 system, DELL G3 computer.

HTTP status code is an identifier used in the HTTP protocol to indicate the server's response to the request. It consists of three digits divided into five series, each representing a different response type. This article will introduce the five series of HTTP status codes and their corresponding status codes.

1xx series: Informational status codes

The 1xx series of status codes indicate that the server has received the request, but further processing is still required. These status codes are mainly used to convey some additional information to help the client understand the progress of the request.

100 Continue: Indicates that the server has received the headers of the request and the client should continue sending the body of the request.

101 Switching Protocols: Indicates that the server has understood the client's request and will switch to a different protocol for processing.

2xx series: Success status code

The status code of the 2xx series indicates that the server successfully received, understood, and processed the request. These status codes usually indicate that the request was successfully processed and the client can continue sending requests or performing other operations.

200 OK: Indicates that the request was successful and the requested resource was returned.

201 Created: Indicates that the request was successful and a new resource was created on the server.

204 No Content: Indicates that the request was successful, but the server did not return any content.

3xx series: Redirect status code

The status code of the 3xx series indicates that the client needs to take further action to complete the request. These status codes are typically used to redirect clients to other resources or addresses.

301 Moved Permanently: Indicates that the requested resource has been permanently moved to a new URL.

302 Found: Indicates that the requested resource has been temporarily moved to a new URL.

304 Not Modified: Indicates that the client’s cached resources are the latest and can be used directly.

4xx series: Client error status code The status code of the

4xx series indicates that the request sent by the client has an error or cannot be completed. These status codes usually indicate that the client needs to take some action to correct the error.

400 Bad Request: Indicates that the request sent by the client has a syntax error.

403 Forbidden: Indicates that the client does not have permission to access the requested resource.

404 Not Found: Indicates that the requested resource does not exist.

5xx series: Server error status code

The status code of the 5xx series indicates that an error occurred when the server processed the request. These status codes usually indicate that the server was unable to complete the request.

500 Internal Server Error: Indicates that an unknown error occurred while the server was executing the request.

502 Bad Gateway: Indicates that the server, acting as a gateway or proxy, received an invalid response from the upstream server.

503 Service Unavailable: Indicates that the server is temporarily unable to process the request, usually due to overload or maintenance.

Summary:

HTTP status code is an identifier used to indicate the server's response to the request. It is divided into five series, including 1xx, 2xx, 3xx, 4xx and 5xx series. Each series represents a different response type, including informational status codes, success status codes, redirect status codes, client error status codes, and server error status codes. Understanding the meaning and purpose of HTTP status codes can help developers better understand and process HTTP requests and responses.

The above is the detailed content of What are the series of http status codes?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template