troubles with jQuery POST
I'm trying to make a post call to a REST service i have setup in C#.
Here is the jQuery code I'm running:
-
var myData = { "Active": "1", "Contactguids": _shapeContactGuidSet, "PageNumber": 1, "PageSize": 100 };
$.ajax({
type: "POST",
data: myData,
url: clientURLBase + "BizService/Contacts.svc/GetMultiContactDetails",
dataType: "json",
contentType: "application/json",
success: function(resp) {
alert("gotit");
_processContactResponse(resp);
},
error: function() {
alert("errorrrreerr");
return false;
}
});
The response i get from this call is a 202 accepted.
I have messed with commenting out the contentType and dataType with mixed results. I'm expecting json back.
The frustrating part is that when it works correctly it hits the error function. and when it doesn't work it hits the success function with an empty string.
If i debug in firefox on the success line i can see that the result i want is in the resp variable which is great, but it doesn't move on after that it just goes to the error.
What am i doing wrong here?