HyperText Transfer Protocol (HTTP)
HTTP is a communication protocol. It defines a mechanism for communication between the browser and the web server.
It is also called request and response protocol because the communication between browser and server takes place in request and response pairs.
HTTP Request
HTTP request comprises of lines which contains:
- Request line
- Header Fields
- Message body
Key Points
- The first line i.e. the Request line specifies the request method i.e. Get or Post.
- The second line specifies the header which indicates the domain name of the server from where index.htm is retrieved.
HTTP Response
Like HTTP request, HTTP response also has certain structure. HTTP response contains:
- Status line
- Headers
- Message body