Difference Between doGet() and doPost() Methods

Difference between doGet and doPost mehtods

DoGet

1)In doGet Method the parameters are appended to the URL and sent along with header information
2)Maximum size of data that can be sent using doget is 240 bytes
3)Parameters are not encrypted
4)DoGet is faster if we set the response content length since the same connection is used. 
5)Thus increasing the performance
6)DoGet should be idempotent. i.e. doget should be able to be repeated safely many times
7)DoGet should be safe without any side effects for which user is held responsible

DoPost

1)In doPost, parame
ters are sent in separate line in the body
2)There is no maximum size for data
3)Parameters are encrypted 
4)Dopost is generally used to update or post some information to the server
5)DoPost is slower compared to doGet since doPost does not write the content length
6)This method does not need to be idempotent. Operations requested through POST can have side effects for which the user can be held accountable, for example, updating stored data or buying items online
7)This method does not need to be either safe 


No comments:

Post a Comment

What is Normalization?

Database normalization is a data design and organization process applied to data structures based on rules that help building relational dat...