Which HTTP status code to return when the DELETE operation is not allowed for particular reason

后端 未结 2 977
孤城傲影
孤城傲影 2021-02-18 13:26

Assume that I have a resource (e.g: /api/shipments/100) which supports HTTP DELETE method. As you can understand from the URI itself, if a DELETE request is made ag

2条回答
  •  清歌不尽
    2021-02-18 14:11

    I would use 412: Precondition Failed.

    Please see this for HTTP status codes

    Web Status Codes

提交回复
热议问题