Co-Authored By:
Beside this, what does it mean to be Idempotent?
Idempotence, in programming and mathematics,is a property of some operations such that no matter howmany times you execute them, you achieve the same result. As such,a POST request should change the result and thatmeans it's not idempotent.
Hereof, what is an idempotent function?
In computing, an idempotent operation is one thathas no additional effect if it is called more than once with thesame input parameters. For example, removing an item from a set canbe considered an idempotent operation on the set. Inmathematics, an idempotent operation is one where f(f(x)) =f(x).
One of the important aspects of REST (or at least HTTP)is the concept that some operations (verbs) are idempotent.As Gregor Roth said several years ago: The PUT method isidempotent. An idempotent method means that the resultof a successful performed request is independent of the number oftimes it is executed.