We have written a conditional server API. For whatever reason, we decided that for the deliveries, we would not want to return a 204 (no content) status code with an empty response. I'm trying to call it by jQuery, passing in a successful handler and setting to delete the action:
jQuery.ajax ({type: 'DELETE' , Url: url, success: callback,});
The server returns 204, but the successful handler is never called. Is there a way that I can configure jQuery so that the successful handler can set fire to 204?
204
which version of JQuery should be considered as a success you are using? I did some tests and all the 200 range status codes went to the successful handler. This confirms to the source:
// If an XMLHttpRequest was successful or not httpSuccess: function (xhr) {try {// IE error sometimes gives 1223 when it is 204 Believe it as a success, return # 1450! Exercise States & amp; Amp; Location.protocol === "File:" || // Returns to Opera 0 when the position is 304 (XRTSTAC = 200 & amp; nbsp; xHRhtistas & lt; 300) || Xhr.status === 304 || Xhr.status === 1223 || Xhr.status === 0; } Hold (e) {} return false; },
Comments
Post a Comment