Pramukh Shlok by Pratik
Pramukh Shlok by Pratik
Pramukh Shlok by Pratik
Features of HTTP:
o Connectionless protocol: HTTP is a connectionless protocol. HTTP client initiates
a request and waits for a response from the server. When the server receives the
request, the server processes the request and sends back the response to the
HTTP client after which the client disconnects the connection. The connection
between client and server exist only during the current request and response
time only.
o Media independent: HTTP protocol is a media independent as data can be sent
as long as both the client and server know how to handle the data content. It is
required for both the client and server to specify the content type in MIME-type
header.
o Stateless: HTTP is a stateless protocol as both the client and server know each
other only during the current request. Due to this nature of the protocol, both
the client and server do not retain the information between various requests of
the web pages.
HTTP Transactions
The above figure shows the HTTP transaction between client and server. The client
initiates a transaction by sending a request message to the server. The server replies to
the request message by sending a response message.
Messages
HTTP messages are of two types: request and response. Both the message types follow
the same message format.
Request Message: The request message is sent by the client that consists of a request
line, headers, and sometimes a body.
Response Message: The response message is sent by the server to the client that
consists of a status line, headers, and sometimes a body.