Because the HTTP GET method is listed as idempotent, the specification GET request can be resubmitted with the assumption that it will not change anything on the server. This does not apply to HTTP POST, which, by specification, can change the status of an application running on a server.
Thus, by specification, you can perform an HTTP GET against page N the number of times, without worrying about changing your status.
Failure to comply with the specification may have various undesirable results. For example, web crawlers follow a GET request to index the site, but not POST. If you allow the HTTP GET request to make changes to the database, you can easily understand the unwanted implication that it may have.
Respect for the specification is in compliance with the agreement between your service or website and many different consumers, which can be ordinary browsers of users, as well as other services, such as web scanners.
You can create a site that uses GET to insert a record, but you should also expect that everything that is built around to consume your site works with the assumption that you are complying with the agreement.
As a final example, web browsers warn users when they try to refresh a page that was reached by an HTTP POST request, warning that some data may be re-sent. You do not get this level of protection for embedded browsers if the page is reached with an HTTP GET request.
You can read more here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
Giuseppe Romagnuolo Aug 23 '13 at 5:59 on 2013-08-23 05:59
source share