Within my API Controller called Payment, I have the following method:
[HttpPost]
public HttpResponseMessage Charge(Payment
Most likely your routing is not configured for the action to be invoked. Hence the request ends up in nowhere and ASP.NET Web API sends a blank-out message "method not allowed".
Can you please update the question with your routing?
As I thought! You are sending to http://localhost:65396/api/payment/charge
while you need to send to http://localhost:65396/api/payment
- assuming your controller is called PaymentController
.
Note that route does not have action
.