Difference between the GET and POST methods
Overview
In this post, let’s look at some of the differences between the GET and POST requests. The GET request is used to retrieve data from the server-side web resource. The POST request is used to modify and update the web resource.
GET vs POST
Some of the differences between the GET and POST methods of the HTTP protocol are as follows:
GET method | POST method |
GET is an idempotent method that means get() cannot modify the server state and data. The get() method request goes to the server & if the requested data is available then the data is sent back to the browser. | POST is NOT an idempotent method. POST can modify the server state and the data available on the server.
|
Theoretically, HTTP specification doesn’t impose any limitation but most browsers limit the GET request. | The HTTP specification doesn’t impose a specific size limit for the POST method. We can transfer huge amounts of data at a time from the browser to the server using the POST method. |
The GET method is not secure.
It can append the data from the URL whenever a request is submitted. So, if any confidential data is entered in the form then its also got displayed in the address bar. |
POST method is a secured method.
It does not append the form data in the address bar.POST method uses the body to send the data. |
The GET does not provide file uploading. | POST method supports file upload. |
GET requests can be bookmarked in the browser. | POST requests cannot be bookmarked in the browser.
|