How to support Partial Updates (PATCH) in REST

前端 未结 3 1587
囚心锁ツ
囚心锁ツ 2021-01-30 17:54

I want to implement the partial updates for my resource as i have large resource and want to update the partial information from it.I have gone through the following links but n

3条回答
  •  时光说笑
    2021-01-30 18:20

    PATCH is to be used with a patch format, for document-level patching only (aka a diff on the actual representation). Its use for other purposes is dubious and debatable, and it's not clear that the method was designed for non-media-type uses.

    In general a POST will be the right approach, but you may want to split your resource into multiple resources instead and modify those instead.

    [Edited for clarity, as some don't read comments]

提交回复
热议问题