HTTP is the rule that a computer communicates over a network, a stateless protocol that does not establish a persistent connection (the client sends a request to the server, the Web server returns a response, and the connection is closed);
A complete HTTP request connection, usually with the following 7 steps:
1, establish a TCP connection (generally go is a TCP connection)
2. Web browser sends request command to Web server
3. Web browser sends request header information
4. Web server Answer
5, the Web server sends the answer header information
6. The Web server sends data to the browser
7. The Web server shuts down the TCP connection
An HTTP request typically consists of four parts:
1. The method or action of the HTTP request, such as a GET or POST request
2, the URL being requested, must know the address of the request is what it
3, the request header, contains some client environment information, authentication information, etc.
4, the request body, that is, the request body, the request body can contain the query string information submitted by the Customer, form information and so on, in general, there is a blank line between the request header and the request body, indicating that the request header has ended, the next content is the request body
HTTP basic knowledge