What are the differences between GET and POST methods ?

Bibek Thapa Magar
2 min readJun 26, 2021

--

GET and POST methods are not the same

The more compact and summarized differences cab be seen on the picture.

But This is not enough for us to know the major differences. So, following are the more elaborated ones:

HTTP:

Hypertext Transfer Protocol (HTTP) was designed to enable communications between clients and servers as a request-response protocol. It uses various methods and the most common are “GET” and “POST”. “GET” method is used to request the data from the server whereas the “POST” method is used to send data to a server to create some resource.

GET method:

GET/RegisterStudent.asp?user=value1&pass=value2

POST method:

POST/RegisterStudent.asp HTTP/1.1  
Host: www.guru99.com
user=value1&pass=value2

The major differences can be pointed out as follows:

Purpose :

First off, the main purpose of each. The “GET” method is used to view something without any modification onto it, It is used for the retrieval of the document. But, The “POST” method is used for modification of something. We use it to update or insert the remote data.

Parameters Placed:

Just by looking at the parameters one can identify whether it is a GET or POST Request. because the parameters like username or the query is placed on the URL in “GET” method whereas the parameters are placed on the body in “POST” method.

Keyword used:

In HTML form, “GET” method uses the “get” keyword whereas “POST” method uses “post”.

Data types:

“GET” method supports only string data types but POST method supports all kinds of data types like string, numeric, binary(image and word documents) etc.

Bookmarking of result:

“GET” method allows bookmarking of the result but “POST” method does not.

Browser history:

The parameters of “GET” request are stored in the browser history but the parameters of “POST” request are not stored in the browser history.

Input Size:

There is limit on the input size in “GET” method as it allows only up to 2048 characters but “POST” method has no limit on input size.

Security:

The parameters are visible in the URL in plain text in “GET” method so it is less secure and can be hacked by script kiddies. But, “POST” method does not make them easily visible so difficult to be hacked.

Usability:

“GET” method should not be used when sending passwords or other sensitive information. But, “POST” method is used when sending passwords or other sensitive information.

Caching:

“GET” method caches the data but “POST” method does not.

--

--

Bibek Thapa Magar

I’m an electronics and Communication Engineer/ Cybersecurity Enthusiast/ Musician / Photographer / Video Editor