HTTP Overview
HTTP (Hypertext Transport Protocol), the Hypertext Transfer Protocol. This protocol provides a detailed set of rules for communication between browsers and the World Wide Web server.
HTTP is a communication rule that stipulates the format of the content that the client sends to the server, as well as the content format that the server sends to the client. In fact, we have to learn this is the two format. The format that the client sends to the server is called the request protocol, and the format that the server sends to the client is called the "response protocol."
HTTP is a stateless protocol. The browser will not remember that the request was made after the request was not contacted last time. HTTP requests consume very high resources. State refers to the first and second requests he knows who sent it. FTP protocol is stateful (file upload download, open folder The following files are displayed)
Request Protocol
The format of the request agreement is as follows:
Request first line;
Request header information;
Empty line;
The request body.
The content that the browser sends to the server in this format, if not this format server will be unable to interpret. In the HTTP protocol, requests have many request methods, the most common of which is get and post. The difference between different request methods, followed by the introduction of 1.1 points.
GET request
POST request