What's the justification behind disallowing partial PUT?

后端 未结 4 1269
一生所求
一生所求 2020-12-08 22:10

Why does an HTTP PUT request have to contain a representation of a \'whole\' state and can\'t just be a partial?

I understand that this is the existing definition of

4条回答
  •  难免孤独
    2020-12-08 22:24

    With a full document update, it's obvious, without knowing any details of the particular API or what its limitations on the document structure are, what the resulting document will be after the update.

    If a certain method was known to never be a partial content update, and an API someone provided only supported that method, then it would always be clear what someone using the API would have to do to change a document to have a given set of valid contents.

提交回复
热议问题