The HTTP protocol works and other HTTP protocols are based on request / response. After a client is connected to the server, send a request to the server, the request method, the unified resource identifier, the protocol version number, and the MIME information includes request modifiers, client information, and possible content. After the server is connected, the corresponding response information is given, the format is a state line including the protocol version number, a successful or error code, and the MIME information includes server information, entity information, and possible content.
After opening a connection, the client sent the request message to the server's stay, complete the request action. The format of the HTTP / 1.0 request message is: request message = request line (General Information | Request Head | Entity First) CRLF [Entity Content] Request Row = Method Request URL HTTP version number CRLF method = GET | HEAD | POST | Extension method u R L = Protocol Name Host Name Directory and File Name Request Row Description The action that should be performed in the specified resource, common methods are Get, Head, and POST. Different request objects correspond to the result of GET, the correspondence is as follows: The content program of the result file file of the object GET is the execution result database query query results Head - require the server to find the meta information of an object, not the object itself. . POST - transmits data from the client to the server, and uses the POST method when requiring the server and CGI for further processing. POST is mainly used to send the content of the FORM in the HTML text, allowing the CGI program to process. An example of a request is: Get http://networking.zju.edu.cn/zju/index.htm http / 1.0
All parameters of the GET will appear in the URL, while the Parameters of the POST method do not appear in the URL. You can also view the HTML page, find the