I have a rather unusual issue I've encountered.
We are currently developing an Ionic application - using Web API as back-end DB. Within the application, we call a $http.post method to post data back to the API, which looks like the following:
$http.post(
ApiEndpoint.url + '/PostUpdate/',
JSON.stringify(postData),
{
headers: {
'Content-Type': 'application/json'
}
}
).success(function(data) {
alert("WORKS!");
});
I can see all the data being POST-ed successfully via the Google Chrome Developer Tools:
However when the POST hits the Web API - not all of the data is featured in the model. Using the above data as an example, you can see that the element "DetailsOfConversation" has data in it - however it is set to null in the model:
however other properties (e.g. OutcomeId, TimeAttend, attendGivenAddress, jobId) have correct values set. This one has me stumped! Any ideas of where I can start hunting the problem down?
EDIT: I've implemented the following custom attribute: http://weblog.west-wind.com/posts/2013/Dec/13/Accepting-Raw-Request-Body-Content-with-ASPNET-Web-API
to allow me to view the raw body of the POST data, it seems the missing fields ARE there:
so i guess if this can't be solved, I'll simply extract the data from that (not ideal, I know)