What is the difference between GET and POST methods?

10,676

Solution 1

GET is for data retrieval only. You can refine what you are getting but it is a read only setup and yes, as you mentioned anything used for refinement are part of the URL.

POST is meant for sending data, but is generally a way to 'break' the simple workings of HTML because you are neither guaranteed of anything that is happening, it can just fetch data, send data or delete data.

There are also PUT and DELETE in the HTML standards, but its all about finding web servers that support these actions as well. As the names imply PUT sends data for either the creation or updating while DELETE is for removal of data.

Enjoy! :)

Solution 2

Other implementation differences in GET and POST:

  • they have different encoding schemes. multipart/form-data is for POST only
  • the result of POST may not result in an actual page.
  • url limit necessitates use of POST
  • If you are using HIDDEN inputs in form then submitting a GET request reveals those inputs
Share:
10,676
Puru
Author by

Puru

Updated on June 26, 2022

Comments

  • Puru
    Puru almost 2 years

    Possible Duplicate:
    When do you use POST and when do you use GET?

    I know the basic difference between GET and POST methods. That is we can see the URL parameters in case of GET and can't see the URL parameters in case of POST. Of course we can pass huge amounts of data by POST which is not possible through GET.

    Are there any other differences between these two methods ?