c# - POST with single parameter returns 404 error -
I have to pass a single parameter in the web API POST method.
The following is my AJAX call:
$ http ({method: 'POST', url: "customer / process customer / "+ Customer ID}) .Vivet (data) {}); Where customerId is a grid . and my Controller: > [HTPP] [Route ("Customer / Processes Customer")] Public Zero Process Customer (Guide ID) {// Some Goods} < / Code> But I do not get 404 when I do this get the error, am I doing wrong?
You are using attribute routing but you have the path to the id parameter In. Instead, use: [Route (see "Customer / Process Customer / {ID}"] For more examples.
Comments
Post a Comment