HTTP GET Method vs HTTP POST Method

In this article, we will see the GET vs POST methods in detail.
GET and POST are 2 important HTTP verbs. HTTP (Hyper Text Transfer Protocol) manages client and server request-response.

HTTP GET Method

  • GET parameters included in the URL
  • Used for fetching resources i.e. data or documents
  • In GET requests we can send data in text format only.
  • GET methods are Read-Only.
  • The state of the application will not change
  • GET has the limitation of maximum URL length. The general limit is 2KB i.e. 2048 characters
  • Request made through GET is cacheable
  • Shouldn’t make any changes to the server
  • GET request is visible in the URL so sensitive data like username and password cannot be sent via GET request.
  • GET request is a safe request
  • Typing a website URL in the browser address bar and pressing enter is the default GET request.

www.sharepointcafe.net
www.google.com

  • If a form tag in an HTML page does not specify any method, then it is a GET request by default.
  • GET requests are Idempotent. It means whether you request a single time or twice or n number of times the response will be the same and there is no change at the server. This type of request is known as an Idempotent method.

HTTP POST Method

  • POST parameter included in the body
  • Used for manipulating data i.e. updating a record or making some changes on the server
  • The user’s request will be encapsulated in the Request body
  • POST has no max limit as it is encapsulated in the Body part. So we can send any amount of data to the server.
  • Request made using POST is not cacheable
  • A POST request is not safe.
  • POST is to make changes to the server
  • The POST request is not visible in the URL
  • POST can send Binary as well as Text data.
  • POST request is Non-Idempotent. As response may change each request. For eg – Updating a record.

Watch this video to learn differences between GET and POST

Conclusion

So, we can now understand the GET vs POST HTTP method. We also came to know the limitations of GET methods.

Leave a Comment

RSS
YouTube
YouTube
Instagram