REST, HTTP DELETE and parameters

后端 未结 4 1272
不知归路
不知归路 2020-11-29 18:20

Is there anything non-RESTful about providing parameters to a HTTP DELETE request?


My scenario is that I\'m modelling the \"Are you sure you want to delete t

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 18:47

    I think this is non-restful. I do not think the restful service should handle the requirement of forcing the user to confirm a delete. I would handle this in the UI.

    Does specifying force_delete=true make sense if this were a program's API? If someone was writing a script to delete this resource, would you want to force them to specify force_delete=true to actually delete the resource?

提交回复
热议问题