Thursday, 19 July 2012

HTTP Request methods


HTTP defines following eight methods for indicating the preferred action to be performed on the identified resource

  1. HEAD: This method asks for the response identical to the one that would correspond to a GET request, but without the response body. This method is useful for retrieving meta-information written in response headers, without transporting the entire content.
  2. GET: This method is used for requesting a representation of the specified resource. GET should not be used for operations that cause side-effects, such as using it for taking actions in web applications.
  3. POST: It submits data to be processed to the identified resource. The data is included in the body of the request. This may result in the creation of a new resource or the updates of existing resources or both.
  4. PUT: Used for uploading a representation of the specified resource.
  5. DELETE: It is used for deleting the specified resource.
  6. TRACE: Use of this method echoes back the received request, so that a client can see what intermediate servers are adding or changing in the request.
  7. OPTIONS: This request method returns the HTTP methods supported by the server for specified URL. This can be used to check the functionality of a web server by requesting '*' instead of a specific resource.
  8. CONNECT: It converts the request connection to a transparent TCP/IP tunnel, generally to facilitate SSL-encrypted communication (HTTPS) through an unencrypted HTTP proxy.
HTTP servers are required to implement at least the GET and HEAD methods and, whenever possible, also the OPTIONS method.

Convert HTTP to other communication protocols

No comments:

Post a Comment