Hypertext Transfer Protocol
(HTTP)
SHIMONA AGARWAL
Introduction
HTTP was introduced by Tim Berners-Lee at CERN.
HTTP functions as a request–response protocol in the client–server
computing model. The client submits an HTTP request message to the
server. The server, which provides resources such as HTML files and
other content, or performs other functions on behalf of the client,
returns a response message to the client. The response contains
completion status information about the request and may also contain
requested content in its message body.
 HTTP is an application layer protocol, which commonly uses
TCP (transmission control protocol).
Connectivity
 HTTP does not handle network connectivity or how
information is transmitted.
 DNS protocol helps client to connect with
requested server.
 Application layer does important work like web
browsing or file transferring.
 The server respond to client request without
knowing anything about Client.
 Each request requires separate TCP network.
Request methods
Http/1.0 (the original version) contained 3 methods –
 GET
 POST
 HEAD
Request methods
GET
The GET method
requests a
representation of the
specified resource.
Requests using GET
should only retrieve
data and should have no
other effect.
POST
The POST method
requests that the server
accept the entity
enclosed in the request
as a new subordinate of
the web resource
identified by the URI.
HEAD
The HEAD method asks for
a response identical to that
of a GET request, but
without the response body.
This is useful for retrieving
meta-information written in
response headers, without
having to transport the entire
content.
Request methods
 HTTP/1.1 (revision of 1.0) added 5 new methods-
 PUT
 DELETE
 TRACE
 OPTION
 CONNECT
Request methods
PUT
The PUT method requests
that the enclosed entity be
stored under the supplied
URI. If the URI refers to
an already existing
resource then the
server can create the
resource with that URI.[
DELETE
The DELETE
method deletes the
specified resource.
TRACE
The TRACE method
echoes the received
request so that a client
can see what changes or
additions have been
made by intermediate
servers.
Request methods
OPTION
 This can be used to check the
functionality of a web server
by requesting '*' instead of a
specific resource.
CONNECT
 The CONNECT method
converts the request
connection to a transparent
TCP/IP.
Persistent Connection
HTTP persistent connection, also called HTTP keep-
alive, or HTTP connection reuse, is the idea of using a
single TCP connection to send and receive multiple HTTP
requests/responses.
Persistent connections stay open across transactions,
until either the client or the server decides to close
them.
Advantages & Disadvantages
Advantages
 Lower CPU and memory usage (because fewer
connections are open simultaneously).
 Enables HTTP pipelining of requests and
responses.
 Reduced network congestion (fewer TCP
connections).
 Reduced latency in subsequent requests (no
handshaking).
 Errors can be reported without the penalty of
closing the TCP connection.
Disadvantages
 If the client does not close the connection
when all of the data it needs has been
received, then the server will be
unavailable for other clients.
Non- Persistent Connection
HTTP non persistent Connection is the idea of using a multiple TCP
connection to send and receive each HTTP requests/responses.
 Each object transfer suffers from low start.
 It is similar to being stateless.

Hypertext transfer protocol (http)

  • 1.
  • 2.
    Introduction HTTP was introducedby Tim Berners-Lee at CERN. HTTP functions as a request–response protocol in the client–server computing model. The client submits an HTTP request message to the server. The server, which provides resources such as HTML files and other content, or performs other functions on behalf of the client, returns a response message to the client. The response contains completion status information about the request and may also contain requested content in its message body.  HTTP is an application layer protocol, which commonly uses TCP (transmission control protocol).
  • 3.
    Connectivity  HTTP doesnot handle network connectivity or how information is transmitted.  DNS protocol helps client to connect with requested server.  Application layer does important work like web browsing or file transferring.  The server respond to client request without knowing anything about Client.  Each request requires separate TCP network.
  • 4.
    Request methods Http/1.0 (theoriginal version) contained 3 methods –  GET  POST  HEAD
  • 5.
    Request methods GET The GETmethod requests a representation of the specified resource. Requests using GET should only retrieve data and should have no other effect. POST The POST method requests that the server accept the entity enclosed in the request as a new subordinate of the web resource identified by the URI. HEAD The HEAD method asks for a response identical to that of a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content.
  • 6.
    Request methods  HTTP/1.1(revision of 1.0) added 5 new methods-  PUT  DELETE  TRACE  OPTION  CONNECT
  • 7.
    Request methods PUT The PUTmethod requests that the enclosed entity be stored under the supplied URI. If the URI refers to an already existing resource then the server can create the resource with that URI.[ DELETE The DELETE method deletes the specified resource. TRACE The TRACE method echoes the received request so that a client can see what changes or additions have been made by intermediate servers.
  • 8.
    Request methods OPTION  Thiscan be used to check the functionality of a web server by requesting '*' instead of a specific resource. CONNECT  The CONNECT method converts the request connection to a transparent TCP/IP.
  • 9.
    Persistent Connection HTTP persistentconnection, also called HTTP keep- alive, or HTTP connection reuse, is the idea of using a single TCP connection to send and receive multiple HTTP requests/responses. Persistent connections stay open across transactions, until either the client or the server decides to close them.
  • 11.
    Advantages & Disadvantages Advantages Lower CPU and memory usage (because fewer connections are open simultaneously).  Enables HTTP pipelining of requests and responses.  Reduced network congestion (fewer TCP connections).  Reduced latency in subsequent requests (no handshaking).  Errors can be reported without the penalty of closing the TCP connection. Disadvantages  If the client does not close the connection when all of the data it needs has been received, then the server will be unavailable for other clients.
  • 12.
    Non- Persistent Connection HTTPnon persistent Connection is the idea of using a multiple TCP connection to send and receive each HTTP requests/responses.  Each object transfer suffers from low start.  It is similar to being stateless.