Home  >  Article  >  What are the http status codes?

What are the http status codes?

zbt
zbtOriginal
2023-10-07 14:09:576770browse

http status codes include informational status codes, success status codes, redirect status codes, client error status codes and server error status codes. Detailed introduction: 1. Informational status code, indicating that the server has received the request and is processing it, but further operations are required to complete the request; 2. Success status code, indicating that the request has been successfully received, understood and processed by the server; 3. Repeat Directed status code, indicating that the client needs to perform further operations to complete the request; 4. Client error status code, indicating that the request initiated by the client has an error or cannot be completed, etc.

What are the http status codes?

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

HTTP status code is a three-digit code returned by the server to the client. It is used to indicate the processing result of the request initiated by the client on the server side. HTTP status codes are divided into five categories, each category has its specific meaning and purpose.

1xx series: Informational status codes The

1xx series of status codes indicate that the server has received the request and is processing it, but further action is required to complete the request.

100 Continue: Indicates that the server has received the header 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 to complete the request.

2xx series: Success status code The status code of the

2xx series indicates that the request has been successfully received, understood and processed by the server.

200 OK: Indicates that the request was successful and the server processed it normally and returned the requested resource.

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

202 Accepted: Indicates that the server has accepted the request, but has not yet completed processing.

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

3xx series: Redirect status codes The

3xx series of status codes indicate that the client needs to perform further operations to complete the request.

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 requested resource has not been modified and the cached version can be used directly.

4xx series: Client error status codes

4xx series status codes indicate that the request initiated by the client has an error or cannot be completed.

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

401 Unauthorized: Indicates that the request requires user authentication.

403 Forbidden: Indicates that the server refuses the request and does not have permission to access.

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

5xx series: Server error status codes

5xx series status codes indicate that an error occurred when the server processed the request.

500 Internal Server Error: Indicates that an error occurred within the server.

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 currently unable to process the request, usually due to overload or maintenance.

Summary:

HTTP status code is a three-digit code returned by the server to the client to indicate the processing result of the request. Different status codes represent different meanings and uses. Knowing and understanding HTTP status codes is very important for developers and network administrators, which can help them quickly locate and solve problems and improve website performance and user experience. .

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

Statement:
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