Features of HTTP and Status Codes

content

1. Features of HTTP

1. Request-response based pattern

2. Stateless preservation

3. No connection

2. HTTP Status Code

2.1 Description

2.2 Format

2.3 Status Code


1. Features of HTTP

1. Request-response based pattern

        There is a request for a response, and the server will not send a response until it receives the client's request.

2. Stateless preservation

        The HTTP protocol itself does not save the communication state between the request and the response. That is to say, it does not persist the sent requests or responses.

3. No connection

        The meaning of connectionless is to limit the processing of only one request per connection. After the server processes the client's request and receives the client's response, it disconnects. In this way, transmission time can be saved, and concurrent performance can be improved. It is impossible to establish a long-term connection with each user, and the server and the client will be interrupted once a request is made.

2. HTTP Status Code

2.1 Description

        The first line of all HTTP responses is the status line.

2.2 Format

        Current HTTP version number + 3-digit status code + phrase describing the status (separated by spaces)

2.3 Status Code

        The first number represents the type of the current response    
            1xx: The request has been received by the server, continue processing
            2xx: The request has been successfully received, understood, and accepted by the server
            3xx: Redirect - follow-up action is required to complete this request
            4xx: Request error (Classic 404 Not Found)
            5xx: Server Error - The server encountered an error while processing a valid request

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=324079774&siteId=291194637