How to design REST API for non-CRUD “commands” like activate and deactivate of a resource?

前端 未结 4 739
隐瞒了意图╮
隐瞒了意图╮ 2020-12-14 01:01

Before I decided to ask this question I have searched quite a long for the answer but I haven\'t found any satisfactory. (e.g. Examples of the best SOAP/REST/RPC web APIs? A

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-14 01:39

    PATCH is the most appropriate method in this case. Please find more at RESTful URL for "Activate"

提交回复
热议问题