S.N. |
Basis of Comparison |
Get |
Post |
1 |
Purpose |
The Get request is designed for getting data from the server. |
The Post request is designed for sending the data to the server. |
2 |
Post Mechanism |
The request is sent via URL. |
The request is sent via an HTTP request body. |
3 |
Parameter Passing |
The request parameters are transmitted as a query string appended to the request. |
The request parameters are transmitted with the body of the request. |
4 |
Default |
It is the default method hence it implements automatically. |
We need to specify manually. |
5 |
Capacity |
We can send limited data with the Get request. |
We can send a large amount of data with the Post request. |
6 |
Data Type |
It always submits data as text. |
We can send any type of data. |
7 |
Security |
The use of Get is safe because it is idempotent. |
The use of Post unsafe because it is non-idempotent. |
8 |
Visibility of Data |
The data is visible to the user as it puts the data in the URL. |
The data is not visible to the user as it puts the data in the message body. |
9 |
Bookmark and Caching |
The Get request can be bookmarked and caching. |
The post request cannot be bookmarked and caching. |
10 |
Efficiency |
It is more efficient than post. |
It is less efficient. |
11 |
Example |
Search is the best example of Get request. |
Login is the best example of a Post request. |