PUT POST being idempotent (REST)

前端 未结 3 843
执念已碎
执念已碎 2020-12-31 15:07

I don\'t quite get how the HTTP verbs are defined as idempotent. All I\'ve read is GET and PUT is idempotent. POST is not idempotent. But you could create a REST API using P

3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-31 15:35

    Indeed, an implementation can do anything it wants. However, if that is incorrect according to the protocol spec, surprising things might happen (such as as library or intermediary repeating a PUT if this first attempt failed).

提交回复
热议问题