Difference between GET and POST Method

GET Method:

GET method is used to transfer data from client to server in HTTP protocol. It is mainly used on the client (Browser) side to send a request to a specified server to get certain data or resources. In the GET method, you can see the retrieved data in the address bar.

POST Method:

Post method is mainly used on the client (Browser) side to send data to a Specified server in order to create or rewrite a particular resource/data. This data sent to the server is stored in the request body of the HTTP request.

GET vs POST Method:

GET POST
1. In GET method, values are visible in the URL.
1. In POST method, values are not visible in the URL.
2. In GET request, only limited amount of data can be sent. 2. In POST request, large amount of data can be sent.
3. It can be bookmarked3. It can't be bookmarked
4. It supports only string data types.4. It supports different data types, such as string, numeric, binary, etc.
5. Get Method is idempotent5. POST Method is non-idempotent
6. It is more efficient than POST method6. It is less efficient than GET method
7. GET is less secure than POST method7. POST is more secure than GET method
8. Here, Only ASCII characters are allowed8. Here, ASCII characters and binary data both are allowed
9. Data passed through this method can be easily stolen by attackers.9. Data passed through this method can not be easily stolen by attackers.
10 GET Parameters remain in web browser history.10. POST Parameters are not saved in web browser history.
11. It is often cache-able11. It is hardly cache-able

Leave a Reply

Your email address will not be published. Required fields are marked *