Thursday, August 8, 2013

What are the differences between "GET" and "POST"?

POST & GET are HTTP request methods to establish communications between clients and servers.

GET:
  • GET method exposes parameters being used in the address bar. This can be useful to bookmark the page.
  • The request gets cached by the browser which can be a potential threat while dealing with sensitive information like passwords.
  • GET method is not suitable for very large variable values (max URL length is 2048 chars).
  • It supports ASCII only.
  • GET requests should only be used to retrieve data.

POST:
  • POST method encapsulates information passed to the server.
  • The variables can be of almost any length (no limits on the amount of information to send).
  • It is impossible to bookmark the page.
  • It supports ASCII & Binary data as well.
  • POST requests should be used only to send data.

No comments :