WEB API 2 Delete returns 405

后端 未结 4 651
深忆病人
深忆病人 2021-01-21 20:06

I\'m trying to do create a delete function in my web API class. I had problems earlier with using the Put and Patch Http messages since these were being linked to WebDAV. After

4条回答
  •  滥情空心
    2021-01-21 20:29

    Your controller is called AccountController and the method is called 'delete' - so don't you need to send in a HTTP DELETE /api/account/delete/JoopSloop in order to match the request to the method.

提交回复
热议问题