Tuesday, March 14, 2006

World Wide Web Basics


Htpp is a protocol to transmit information in the world wide web. It is a request/response protocol between the client and the server. The client is most of the times a web browser that issues a request to a server connecting to a particular port (by default the port is 80).
The server issues a response that contains a status and a message.
The request message consists of a request line, a header, a empty line and a optional message body.

The request line contains information about the:

  • request method
  • resource identifier
  • protocol

The request method is one of the following:

  • GET
  • HEAD
  • POST
  • DELETE
  • OTHERS

The resource identifier is a path or a path and a filename.

The headers are pairs of key: value separated. An example is "Accept-Language: en" .

The protocol version can be specified by HTTP/1.0 or HTTP/1.1 (current version).

Example:

The reply:

  • HTTP/1.1 200 OK
  • ...
  • Server:...
  • Content-Type: text/html
  • And the message

More detailed information can be found at wikipedia.

0 Comments:

Post a Comment

<< Home