1.

What is the difference between idempotent and safe HTTP methods?

Answer»
  • Safe methods are those that do not change any resources internally. These methods can be cached and can be RETRIEVED without any effects on the resource.
  • IDEMPOTENT methods are those methods that do not change the responses to the resources EXTERNALLY. They can be called multiple TIMES without any change in the responses.

According to restcookbook.com, the following is the table that describes what methods are idempotent and what is safe.

HTTP MethodsIdempotent Safe
OPTIONSyesyes
GETyesyes
HEADyesyes
PUTyesno
POSTnono
DELETEyesno
PATCHnono


Discussion

No Comment Found