Ajax Post: 405 Method Not Allowed

后端 未结 3 1519
庸人自扰
庸人自扰 2021-02-07 09:19

Within my API Controller called Payment, I have the following method:

[HttpPost]
public HttpResponseMessage Charge(Payment         


        
3条回答
  •  余生分开走
    2021-02-07 10:16

    I had the same problem with my controller. The only thing which is different is the ending of the URL. Add "/" to "http://localhost:65396/api/payment/charge" at the end, that helped me

提交回复
热议问题