Whenever we go someplace on the Web, we use HTTP as part of the URL address. It does much more than whisk us to our destination sites as explained in the previous sections. HTTP (Hypertext Transfer Protocol) is the language of clients and servers. They speak HTTP to each other.
HTTP transactions consist of a client request followed by a server response and the request has three parts:
Request or response line
Request or Response Line
When you click a link on this page, the client contacts the server at a designated port number, often the default of 80. During this communication, it is requesting a document through an HTTP command called a method followed by a document address, and then the HTTP version number: GET /index.html HTTP/1.1
GET is the method meaning to retrieve the document index.html using version HTTP 1.1. Other methods are POST, PUT, TRACE, and LINK.
Header Section and Entity Body
The next thing the client sends is an optional header to tell the server of its configuration and the document formats it accepts. Headers are sent line by line with each line containing a header name and value in Header-Name: Value format. For example: