November 3, 2010 at 12:18 PM
- In doGet Method the parameters are appended to the URL and sent along with header information.In doPost Method , parameters are sent in separate line in the body.
- In doGet Method maximum size of data that can be sent 240 bytes.In doPost Method,there is no maximum size for data.
- In doGet Method, parameters are not encrypted.In doPost Method,parameters are encrypted.
- DoGet is faster if we set the response content length since the same connection is used. Thus increasing the performance.DoPost Method is slower compared to doGet since doPost does not write the content length.
- DoGet should be idempotent. i.e. doget should be able to be repeated safely many times.DoPost 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.
- DoGet should be safe without any side effects for which user is held responsible.In doPost Method,This method does not need to be either safe.