Minggu, 04 September 2016

HTTP - Hyper Text Transfer Protocol

HTTP - Hyper Text Transfer Protocol


The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web.
HTTP, Hyper Text Transfer Protocol



Hypertext is structured text that uses logical links (hyperlinks) between nodes containing text. HTTP is the protocol to exchange or transfer hypertext.

Development of HTTP was initiated by Tim Berners-Lee at CERN in 1989. Standards development of HTTP was coordinated by the Internet Engineering Task Force (IETF) and the World Wide Web Consortium (W3C), culminating in the publication of a series of Requests for Comments (RFCs). The first definition of HTTP/1.1, the version of HTTP in common use, occurred in RFC 2068 in 1997, although this was obsoleted by RFC 2616 in 1999.
  • Transactions between client and server
  1. Client connects
  2. Client makes one or more Requests
  3. Server Responds to Requests 
  4. Client drops connection 
  • Http client request has three parts:
     1) Method, document URL, HTTP version
           Most frequently used methods are:
  • GET request a document or data
  • HEAD request document attributes only
  • POST send data to server
      2) Browser type, OS, and acceptable media
      3) Optional data

HTTP request example

GET /articles/news/today.asp HTTP/1.1Accept: */*Accept-Language: en-usConnection: Keep-AliveHost: localhostReferer: http://localhost/links.aspUser-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)Accept-Encoding: gzip, deflate

The header of a request must be followed by a blank line, which is used to separate the header from the body of the request.

HTTP server response

Response has three parts:
1) HTTP version, response code, message
2) Header information
  • Date and time
  • Server type
  • Last modified date and time
Content type and length
3) Body (optional)

Response Phase Form

Response Phase Form

HTTP response example

žThe header field, Content-type, is required
žAn example of a complete response header:
  HTTP/1.1  200  OK
  Date: Mon, 27 Jun 2002 17:22:47 GMT
  Server: Apache/1.3.22 (Unix) (Red-Hat/Linux)
  Last-modified: Wed, 26 Jun 2002 18:12:29 GMT
  Accept-ranges: bytes
  Content-length: 75
  Connection: close
  Content-type: text/html

<HTML>
<BODY>

2 komentar


EmoticonEmoticon