HTTP - Hypertext Transfer Protocol

HTTP is one of the most successful and widelyreturned.
used protocols on the Internet today. It isResponse
application-layer protocol used to transmit andIt is the response send by the web server to
receive hypertext pages. HTTP allows a clientclient. The server firstly locates the requested
usually a web browser to send a simple requestdocument and sends the appropriate response.
and receive response back from the server.However there is a format specified by HTTP to
Whenever you write a URL in address bar of yousend the response from server. Every HTTP
browser, your browser firstly contacts the webresponse consists of Status-Line,
server, web server locates the requested pageResponse-Headers and Message-Body. Sample
and sends the appropriate response. TheseHTTP response is shown below.
requests and responses are issued in HTTP.HTTP/1.1 200 OK
Each HTTP cycle has following steps:Server: Apache/1.3.3.7
ConnectionDate: Mon, 23 May 2005 22:38:34 GMT
The connection is established between a webAccept-Ranges: bytes
browser and a web server. The connection isContent-Type: text/html
established via TCP/IP protocols over particularContent-Length: 512
port generally port 80 is used. However, HTTP isLast-Modified: Tue, 18 Jan 2007 10:12:30 GMT
not used to establish connection, it only definesConnection: closehello worldHello world
the rules that specify how they communicate.The first line of the every HTTP response is
Requestcalled the Status-Line and consists of numeric
The web browser sends a request to server,status code returned along with reason phrase. It
specifying the resource to retrieve. HTTP definesis the response returned associated with the
the set of rules for sending the request. EveryHTTP request. After Status-Line,
HTTP request consists of Request-Line,Response-Header starts and providing the
Request-Headers and Message-Body. Samplecharacteristics associated with data returned.
HTTP request is shown below.Close
GET /index.htm HTTP/1.1Finally connection is closed. After each request
HOST:and response cycle the connection is closed. Each
Accept: text/html, text/plaintime the web browser makes request, new
User-Agent: Mozilla/4.0connection is established. There is no account for
Each HTTP request has request line and consiststhe previous requested resource on web server
of request methods, URI, and HTTP version.or I can say that there is no session maintained.
After Request-Line, Request-Header starts andThis makes HTTP a stateless protocol.
providing the characteristics associated with data