What is stateless protocol in HTTP

Stateless protocol means each command is executed independently, without any knowledge of the commands that came before it.That is the protocol cant remember what u did in your last web session.But this is over come using cookies,which maintain states of the users to remember their previous activity.It is the protocol used to convey information of World Wide Web (WWW).HTTP protocol is a stateless and connectionless protocol. HTTP 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/request paradigm. In this protocol the communication generally takes place over a TCP/IP protocol.

Stateless protocol in HTTP

A stateless protocol does not require the server to retain information or status about each user for the duration of multiple requests.

HTTP Request Methods:

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.

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.

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.

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.

DELETE Method: It is used for delete the resources, files at the requested URL

OPTIONS Method: It lists the Http methods to which the thing at the requested URL can respond.

PUT Method: It put the enclosed information at the requestedURL.

CONNECT Method: It connects for the purpose of tunneling.

No comments:

Post a Comment

Download the eBook of react js for beginners

ReactJS basically is an open-source JavaScript library which is used for building user interfaces specifically for single page applications...