Home > Common Problem > What are the http protocol status codes?

What are the http protocol status codes?

尊渡假赌尊渡假赌尊渡假赌
Release: 2023-12-25 15:15:46
Original
873 people have browsed it

http protocol status codes include "1xx informational status code", "2xx success status code", "3xx redirection status code", "4xx client error status code" and "5xx server error status code" Five types: 1. 1xx, indicating that the server has received the request and is processing it; 2. 2xx, indicating that the request has been successfully received, understood and processed by the server; 3. 3xx, indicating that further operations are required to complete the request; 4. 4xx, indicating that The client's request has an error or cannot be completed, etc.

What are the http protocol status codes?

# Operating system for this tutorial: Windows 10 system, Dell G3 computer.

The HTTP protocol defines a variety of status codes to indicate the server's processing results of client requests. The following are common HTTP status code categories and what they represent:

1xx (Informational status code): Indicates that the server has received the request and is processing it.

  • 100 Continue: The server has received the initial part of the request and the client should continue sending the remainder.
  • 101 Switching Protocols: The server requires the client to switch protocols.

2xx (success status code): Indicates that the request has been successfully received, understood and processed by the server.

  • 200 OK (success): The request is successful and the corresponding content is returned.
  • 201 Created: The request was successful and a new resource was created on the server.
  • 204 No Content: The server successfully processed the request but did not return any content.

3xx (redirect status code): Indicates that further action is required to complete the request.

  • 301 Moved Permanently: The requested resource has been permanently moved to a new URL.
  • 302 Found (Temporary Redirect): The requested resource is temporarily moved to a new URL.
  • 304 Not Modified: The client can use the cached version because the resource has not been modified.

4xx (client error status code): Indicates that the client's request has an error or cannot be completed.

  • 400 Bad Request: The server cannot understand the client's request.
  • 401 Unauthorized: Authentication is required to obtain the requested resource.
  • 404 Not Found: The requested resource does not exist.

5xx (server error status code): Indicates that an error occurred when the server processed the request.

  • 500 Internal Server Error: The server encountered an unexpected condition and was unable to complete the request.
  • 503 Service Unavailable: The server is temporarily unable to handle requests, usually due to overload or maintenance.

These are just some of the common HTTP status codes. The HTTP protocol also defines other status codes. Understanding these status codes helps developers understand the server's processing results of requests and take appropriate actions.

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