2
Answers

Ajax post allways sends null parameter to web api controller

René Brice

René Brice

8y
613
1
I use ajax call from mobile site to get and send data to a web api service. The get calls work fine but I can't make a post . In the web api controller, the parameter is allways null.  The ajax post properties  are : accept: 'text/json',
dataType : 'text'
contentType : 'text/json'
crossDomain : true
data: JSON.stringify(myObject)
 
 I try to pass a primitive parameter to the controller, the result is the same, no data sent
 
Environment : Visual Studio 2015 with Apache Cordova 
 
Help Please 
 
 
Answers (2)