Home >Common Problem >Which http status codes are successful?

Which http status codes are successful?

百草
百草Original
2023-10-12 16:29:251330browse

The successful http status codes are 200, 201, 202, 204, 206 and 226, etc. Detailed introduction: 1. 200 OK, which is one of the most common HTTP status codes, indicating that the request was successful. The server successfully processed the client's request and returned the requested resource. This status code is usually used for GET and POST requests; 2 , 201 Created, this status code indicates that the server has successfully processed the client's request and created a new resource, usually used for POST requests and so on.

Which http status codes are successful?

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

HTTP status code is a three-digit code used to indicate the status of communication between the client and the server. These status codes are defined by the HTTP protocol and play a very important role in the communication process between client and server. This article will introduce some common success status codes in HTTP status codes.

1. 200 OK: This is one of the most common HTTP status codes, indicating that the request was successful. The server successfully processed the client's request and returned the requested resource. This status code is typically used for GET and POST requests.

2. 201 Created: This status code indicates that the server has successfully processed the client's request and created a new resource. Usually used for POST requests, returned when the server creates a new resource.

3. 202 Accepted: This status code indicates that the server has accepted the client's request, but has not yet completed processing. Typically used in asynchronous operations to tell the client that the request has been accepted, but processing has not yet completed.

4. 204 No Content: This status code indicates that the server successfully processed the client's request but did not return any content. Usually used for DELETE requests to indicate that the resource has been successfully deleted.

5. 206 Partial Content: This status code indicates that the server successfully processed part of the client's request. It is usually used for resuming downloads or downloading in chunks, and the server returns part of the content.

6. 226 IM Used: This status code indicates that the server has satisfied the client's request and returned the corresponding instance. Typically used to convert one instance to another.

These status codes indicate that the communication between the client and the server is successful. When the client receives these status codes, it can determine whether the request is successful based on the specific status codes and handle it accordingly. When developing web applications, it is very important to understand these status codes, which can help us better handle the communication between the client and the server.

The above is the detailed content of Which http status codes are successful?. 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

Related articles

See more