I have the following call:
var params={type:"PUT", dataType:"application/json; charset=UTF-8", url:"api/servletpat", data:JSON.stringify(dataObject)};
$.ajax(params)
.done(function(data, status, jqXHR){
successCallback(data);
})
.fail(function(jqXHR, status, thrown){
if (jqXHR.status == 200){
successCallback(null);
}
});
Although the server does send a JSON response, ajax executed the .fail case with jqXHR.status = 200. Which means the returned data is not accessible. I cannot use "GET" because GET encodes the submitted object in the URL and this is not acceptable. What do I need to do to be able to read the returned JSON object ? Thanks...