Answer: The differences between both are described as follows:
GET: Parameters are passed in the querystring. This method appends the form-data to the URL in name/value pairs. Maximum amount of data that can be sent via the GET method is limited to about 2kb. Never use the "get" method to pass sensitive information! (password or other sensitive information will be visible in the browser's address bar).
POST: Parameters are passed in the request body. This method sends the form-data as an HTTP post transaction. There is no limit to the amount of data that can be transferred using POST. However, there are limits on the maximum amount of data that can be transferred in one name/value pair.
For example, go through the below link.
http://www.weberdev.com/get_example.php3?ExampleID=4345
Asked In: Many Interviews |
Alert Moderator