Hypertext transfer protocol (HTTP) is designed to enable communications between client and server.

Do you know that there are various HTTP Methods? The few methods are

1.GET

2.POST

3.PUT

4.HEAD

5.DELETE

6.PATCH

7.OPTIONS

Let us know about the most commonly used HTTP methods.

The GET Method

GET is used to request data from a specified resource or server. We can able to see get request in the URL which is decrypted.

The best example is, whatever we are typing in Google to fetch the information comes under get method.

Some other features of GET requests are:

  • It remains in the browser history.
  • It can be bookmarked.
  • It can be cached.
  • It has length restrictions.
  • It should never be used when dealing with sensitive data.
  • It should only be used for retrieving the data.

 The POST Method

The POST is used to send the data to the server to create or update the resource which is encrypted.

The username and password whichever we are entering to log-in into Facebook or Gmail can be considered as an example for post method.

Some other features of POST requests are:

  • These requests cannot be bookmarked.
  • This request has no restrictions on the length of data.
  • This request is never cached.
  • This request does not remain in the browser history.

Hope, you all got an idea on get and post method which will be more useful in programming.

Advertisements

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s