Tuesday, January 10, 2012
HTTP protocol
HTTP Protocol stands for Hyper Text Transfer Protocol.
It is the protocol used to convey information of World Wide Web (WWW). HTTP
protocol is a stateless and connectionless protocol. It is called as a
stateless protocol because each command is request is executed independently,
without any knowledge of the requests that were executed before it. It is the
protocol used for the web. It is based on a request/response paradigm. In this
protocol the communication generally takes place over a TCP/IP protocol.
HTTP Request Methods:
1) GET Method: The Get method is used to
getting the data from the server. Get method appends the parameters passed as
query string to a URL, in the form of key- value pairs. for example, if a
parameter is name = Williams, then this string will be appended in the URL. By
default the method is Get.
2) POST Method: The post method is used for
sending data to the server. In post method the query string is appended along
the request object, they do not get appended in the URL, so parameters transfer
in hidden form.
3) HEAD Method: When a user wants to
know about the headers, like MIME types, charset, Content- Length then we use
Head method. With this no body content is returned.
These three are
commonly used methods of jsp while Get and Post methods are most widely used.
There are more methods of http protocols which are rarely used by they have
been given here for your knowledge.
4) TRACE Method: Trace on the jsp resource
returns the content of the resource. Asks for a loopback of the request
message, so that the use can see what is being recieved on the other side.
5) DELETE Method: It is used for delete the
resources, files at the requested URL
6) OPTIONS Method: It lists the Http methods to
which the thing at the requested URL can respond.
7) PUT Method: It put the enclosed
information at the requestedURL.
8) CONNECT Method: It connects for the purpose of
tunneling.