My guess is that you are really asking what idempotent really means. www.dictionay.com -> idempotent
Acting as if used only once, even if used multiple times
What this really means is the methods GET, HEAD, etc should not make changes that will cause a second identical request (for the same user in the same session) to display different information, ie update the database.
Methods such as Post and PUT are not expected to be idempotent, that is two identical requests (from the same user in the same session) may result in different results being displayed to the user.
To put this another way adding an item to a shopping cart is not an idempotent request as it changes information curical to the user. Where as viewing the contents of the shopping cart should not change the contents of the shopping cart as it therefore an idempotent request.
Logically speaking, all POST, PUT and DELETE should be idempotent, but from the perspective of the certification, possibly the book assumption should be correct.
PUT and DELETE could have effect, like putting a file or deleting a resource. The second time you do the same operation, it would possibly throw a warning that either resource is already present or not there.
Hello, Considering PUT and DELETE, reading the page Mat Williams mentioned make me think that the server should not warn the user if the file to be PUT is already there or the file to be DELETEd is not there anymore. It should be transparent because these methods are also considered idempotent.
I think that for GET and HEAD we have an agreement that they are idempotent. Request a HEAD the N-time for a file should have the exactly result that requesting the HEAD for the same file at the first time.
However, about POST, I don't agree with you. POST is not idempotent. For example, if you have a HTML Form for insert a person in the database. The first time you submit the form that record will be inserted in the database. The second time you submit the form you will get a duplicate key exception (or something like that). And we may find other similar examples. Regars, Alexandre