Comparing request and response messages
When interacting with a web page, a client will request objects from a server. In most cases, a standard transaction involves a request from the client and then a response from the server. Because the client and the server both convey a different message, the headers are slightly different. In this segment, we'll take a high-level view of the HTTP header and fields for both the client and the server.
Let's start by examining the elements of an HTTP request.
Viewing an HTTP request
When viewing a client request, you will most likely see a request line followed by header lines, as shown in the following diagram:
Each request message will indicate the method (such as GET
or POST
) and the URL, along with additional parameters. It's also common to see the following:
- The
\r
symbol, which is used to indicate a carriage return - The
\n
symbol, which...