0%

PUT POST PATCH in HTTP

In the HyperText Transfer Protocol (HTTP), idempotence and safety are the major attributes that separate HTTP verbs.

Of the major HTTP verbs, GET, PUT, and DELETE are idempotent (if implemented according to the standard), but POST is not.[9] These verbs represent very abstract operations in computer science: GET retrieves a resource; PUT stores content at a resource; and DELETE eliminates a resource. As in the example above, reading data usually has no side effects, so it is idempotent (in fact nullipotent). Storing a given set of content is usually idempotent, as the final value stored remains the same after each execution. And deleting something is generally idempotent, as the end result is always the absence of the thing deleted.

参考

PUT vs POST in REST

Idempotence wiki