I'm new to jquery promises and deferred objects. I'm trying to get or analyze the response of a POST/PUT/DELETE ajax request. I'm looking to be able to read the HTTP status code (200, 204, ...).
When using $.when and the deferred objects in this way:
$.when($.ajax(request)).then(callback_function(response))
It is possible to analyze the HTTP status code? The response vble itself is empty, since there is no data in the response. If it is not possible, Would the solution be to use done() or fail() functions? What if it is important to recognize the HTTP status code to act over it?
Check jQuery documentation http://api.jquery.com/jQuery.ajax/ and search for "The jqXHR Object" there you have the solution.