14.8 The HTTP Request
The HTTP request (and response) structure reminds us of an email structure. At first sight, we see the difference only in the first line. The first line of a request contains a method, and the first line of a response contains status line.
An HTTP request consists of the following (see Figure 14.10):
- A method: HTTP version 1.1 supports the following methods:
GET, POST, HEAD, OPTIONS, TRACE, CONNECT, PUT
, andDELETE
. ThePUT
andDELETE
methods are not always implemented. - A header: This consists of individual header fields. Every header field starts with a keyword (for example,
Host)
. A colon followed by a space terminates the keyword. After a space, the header field parameters can follow. The whole header field is always terminated ...
Get Understanding TCP/IP now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.