rohit sen wrote:Both PUT and DELETE change something on the server, so calling them repeatedly does not cause the same effect.
Bear Bibeault wrote:In other words "why do you think that they are considered idempotent"? Who said so?
9.1.2 Idempotent Methods
Methods can also have the property of "idempotence" in that (aside from error or expiration issues) the side-effects of N > 0 identical requests is the same as for a single request. The methods GET, HEAD, PUT and DELETE share this property. Also, the methods OPTIONS and TRACE SHOULD NOT have side effects, and so are inherently idempotent.
However, it is possible that a sequence of several requests is non- idempotent, even if all of the methods executed in that sequence are idempotent. (A sequence is idempotent if a single execution of the entire sequence always yields a result that is not changed by a reexecution of all, or part, of that sequence.) For example, a sequence is non-idempotent if its result depends on a value that is later modified in the same sequence.
A sequence that never has side effects is idempotent, by definition (provided that no concurrent operations are being executed on the same set of resources).
Note: there are several different uses of the word
“idempotent”; we’re using it in the HTTP/servlet way
to mean that the same request can be made twice with
no negative consequences on the server. We do *not*
use “idempotent” to mean that the same request always
returns the same response, and we do NOT mean that a
request has NO side effects.
Destiny's powerful hand has made the bed of my future. And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|