usage of [From Body] in WebApi POST method gets NULL param

142 Views Asked by At

I am using [FromBody] in WebApi. And when I send requests to the POST method, the request doesnot have the passed body param.I receive a NULL in the param and also if I inspect the Request oibject it doesnt have the param in the Content. Tried using both fiddler and through a WebRequest. It worked when I removed the [FromBody] tag,I cpuld read it using the Request object. Any explanations to it?

0

There are 0 best solutions below