Hypertext Transfer Protocol(HTTP)
Hypertext transfer Protocol is a communication protocol.HTTP is used for the transfer of information on intranets and the World Wide Web.The applicaton level protocol of TCP/IP suite the makes the WWW workable is Hypertext Transfer protocol.HTTP is now the standard Web service protocol.It enables transfers of files on Internet that may include text,graphic,images,sound,video and other multimedia files on the World Wide Web.HTTP is the protocol that Web browsers(Clients) and Web servers use to communicate with each other on the Internet.Clients(Web browsers) send requests to Web servers for Web elements such as Web page and images.When the server sends the response,the connection between client and server across the Internet is disconnected.A Web server is a computer that has certain amount of space allocated separately and stores a lot of information in the form of HTML files along with other files such as images,sound tec. An HTTP is program that is designed to wait for a number of incoming HTTP requests and respond them when they arrive.The standard Web browsers installed at the client’s computers generate requests that are handelled at the server by this HTTP daemon.
There are three basic features that make HTTP a simple but powerful protocol:
- HTTP is connectionless:The HTTP client, i.e., a browser initiates an HTTP request and after a request is made, the client disconnects from the server and waits for a response. The server processes the request and re-establishes the connection with the client to send a response back.
- HTTP is media independent:It means, any type of data can be sent by HTTP as long as both the client and the server know how to handle the data content. It is required for the client as well as the server to specify the content type using appropriate MIME-type.
- HTTP is stateless:As mentioned above, HTTP is connectionless and it is a direct result of HTTP being a stateless protocol. The server and client are aware of each other only during a current request. Afterwards, both of them forget about each other. Due to this nature of the protocol, neither the client nor the browser can retain information between different requests across the web pages.
The following diagram shows a very basic architecture of a web application and depicts where HTTP sits:
The HTTP protocol is a request/response protocol based on the client/server based architecture where web browsers, robots and search engines, etc. act like HTTP clients, and the Web server acts as a server.
The HTTP client sends a request to the server in the form of a request method, URI, and protocol version, followed by a MIME-like message containing request modifiers, client information, and possible body content over a TCP/IP connection.
The HTTP server responds with a status line, including the message’s protocol version and a success or error code, followed by a MIME-like message containing server information, entity meta information, and possible entity-body content.