Last post Sep 12, 2014 02:48 AM by damienBod
Sep 11, 2014 07:05 AM|chaitu.lucky|LINK
Jun 08, 2012 02:19 PM|LINK
Hi All ,
I am new to Web API . I have a simple controller as ValuesController . I have a post method as
public void Post(string id)
var test = 0;
I am using fiddler to hit this Post function . I am doing following things .
a) Give URL as http://localhost/Mobile/api/values.
b) I have also changed Content type as application/json
c) I select POST operation and give request body as
d) Method is getting hit but id comes as null everytime .
Am I misiing anything ? Please let me know .
Sep 12, 2014 02:48 AM|damienBod|LINK
Add a [FromBody] to the parameter.
[FromBody] to the parameter.
public void Post([FromBody] string id)
here's some simple samples, how to do parameter binding with fiddler or whatever