Ext.: http://www.runoob.com/http/http-messages.html
HTTP is an architecture model based on client/server (c/s) that exchanges information through a reliable link and is a stateless request/response protocol.
An HTTP "client" is an application (Web browser or any other client) that connects to the server to achieve the purpose of sending one or more HTTP requests to the server.
An HTTP "server" is also an application (typically a Web service, such as an Apache Web server or an IIS server) that receives requests from clients and sends HTTP response data to the client.
HTTP uses a Uniform Resource identifier (Uniform Resource Identifiers, URI) to transfer data and establish a connection.
Once the connection is established, the data message is routed through the format [RFC5322] and Multipurpose Internet Mail Extensions (MIME) [RFC2045] that are used by similar Internet mail.
Client Request message
The client sends an HTTP request to the server with a request message that includes the following format: A request line, a request header (header), a blank line, and four parts of the request data, giving the general format of the request message.
Server Response Message
The HTTP response is also made up of four parts: the status line, the message header, the blank line, and the response body.
Instance
The following example is a typical example of using get to pass data:
Client Request:
GET/Hello.TXT HTTP/1.1User-Agent: Curl/7.16. 3 Libcurl/7.16. 3 openssl/0.9.7l Zlib/1.2. 3host: Www. Example. Comaccept-language: En, mi
Service-Side response:
HTTP/1.1 200OkDate: Mon, 27 Jul 2009 12:28:53GmtServer: ApacheLast-Modified: Wed, 22 Jul 2009 19:15:56 Gmtetag : "34aa387-d-1568eb00" Accept-ranges: Bytes Content-length: 51< Span class= "PLN" >vary: accept -encodingcontent-< Span class= "Typ" >type: Text/plain
Output Result:
Hello World! My payload includes a trailing CRLF.
HTTP message Structure