0

What is the difference between the GET and POST form method except one(GET) send data from URL and post send directly ?

And if i use SSL then should i choose only post since get wont work ?

Kara
  • 6,115
  • 16
  • 50
  • 57

1 Answers1

3

There really is nothing different between GET and POST. While GET uses URL visibly, you should not think that POST data is hidden in anyway, as this could create false sense of security. While POST indeed hides data from URL, it's still there, exposing slightly less data to a casual observer.

Even if HTTPS is used, preventing the data from being intercepted in transit, the browser history and the web server's logs will likely contain the full URL in plaintext, which may be exposed if either system is hacked. In these cases, HTTP POST should be used.


GET is used to read data. It's mostly used in search strings and in actions, where you get data from end point and where you don't modify anything. Because it's visible in URL, you can bookmark it for later use, that's not possible with POST.

POST is used to create, update and delete data in end point. For example form data is supposed to be sent as POST.

Katu
  • 701
  • 1
  • 8
  • 22