Hypertext Transfer Protocol


HTTP is a communication protocol. It comprises a request or response sequence which means a browser request and a server response to that. This has two streams; request & response stream.
Key elements of request stream.

  • HTTP Method – what action going to perform.
  • URL – which page going to access.
  • Form Parameters – input values

Key elements of response stream

  • Status code – value used to identify the response status.
  • context type – its an MIME type(text, HTML, xml,….) of the response content.
  • response content. – HTML page or image.

HTTP Methods

There are several HTTP methods available. Of which GET & POST methods are mostly used by web developers. Lets see what these two methods can perform.

GET Method

  • Its a simple request, asking server to GET the page.
  • Response may be HTML, JPEG, PDF, etc.
  • Non-Secure one.
  • URL length is limited one.(Maximum 255 characters allowed).

POST Method.

  • Used to send user data to server ie) giving the server what user typed in the form.
  • more powerful request.
  • request something and at the same time send form data to server.
  • secured communication.
Advertisements

Tags: , , , , , , ,

4 Responses to “Hypertext Transfer Protocol”

  1. Akila Says:

    Post method is a “more powerful request.”–> Can u justify this ?

    • manikandanmv Says:

      akila,

      below are the reasons for saying POST as a “more powerful request”

      * request something and at the same time send form data to server.
      * “message body” which means form data parameters part has no limit in sending to server unlike GET.
      * data sending via this method is secure when compare with GET.

      I hope this is enough.

      • Akila Says:

        “request something and at the same time send form data to server” this can be achieve by both POST and GET method.So it wont gonna be a valid pt. here….

  2. manikandanmv Says:

    akila,

    Its a valid point, you have misunderstood it. GET method is designed to be used for GET something from the server. Perhaps some developers are using it in wrong way by sending form data. This does not mean its not possible to send the form data via GET method. But its not designed for that, its for making simple request to server.

    Simply saying, The name implies what its action.

    GET – asking server to GET the page.
    POST – POSTing data what the user typed in the form to the server.

    I can recommend, use POST whenever you send form data to server. That’s the Good way of writing code.

    Hope, now you understand the difference.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: