Home  >  Article  >  What are the http error status codes?

What are the http error status codes?

zbt
zbtOriginal
2023-10-07 15:10:412309browse

http error status codes include information status codes, success status codes, redirection status codes, client error status codes and server error status codes. Detailed introduction: 1. Information status code, indicating that the request has been received and processing continues; 2. Success status code, indicating that the request has been successfully processed; 3. Redirection status code, indicating that further operations are required to complete the request; 4. The client error status code indicates that the client's request is incorrect; 5. The server error status code indicates that an error occurred when the server processed the request.

What are the http error status codes?

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

HTTP error status code refers to a standardized error code returned by the server to the client during HTTP communication. They are used to indicate whether the request succeeded or failed, and the reason for the failure. HTTP error status codes consist of three digits and are divided into five categories, each category represents a different error type. Common HTTP error status codes and their meanings are introduced below.

1xx: Information status code The status code of the

1xx series indicates that the request has been received and processing continues.

- 100 Continue: The request has been received by the server and the client should continue sending the remainder of the request.

- 101 Switching Protocols: The server will switch protocols according to the client's requirements.

2xx: Success status code The status code of the

2xx series indicates that the request has been successfully processed.

- 200 OK: The request was successfully processed.

- 201 Created: The request has been fulfilled and new resources have been created according to the requested needs.

- 204 No Content: The server successfully processed the request but did not return any content.

3xx: Redirect class status code The status code of the

3xx series indicates that further action is required to complete the request.

- 301 Moved Permanently: The requested resource has been permanently moved to a new location.

- 302 Found: The requested resource has been temporarily moved to a new location.

- 304 Not Modified: The resource has not been modified and the client can use the cached version.

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

4xx series indicates that the client's request is incorrect.

- 400 Bad Request: The server cannot understand the syntax of the request.

- 401 Unauthorized: The request requires user verification.

- 403 Forbidden: The server refused the request.

- 404 Not Found: The requested resource does not exist.

5xx: Server error status code The status code of the

5xx series indicates that an error occurred when the server processed the request.

- 500 Internal Server Error: The server has an internal error and cannot complete the request.

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

- 503 Service Unavailable: The server is temporarily unavailable, usually due to overload or maintenance.

The above are common HTTP error status codes. Each status code has its own specific meaning, which can help developers and users understand the processing of requests. When doing web development or using web services, it is very important to understand these status codes, which can help us better handle and debug HTTP requests and responses. .

The above is the detailed content of What are the http error 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