$.ajax({
async:false,
type: 'POST',
url: itemURL,
success: function(data,status,jqXHR) {
responseObj = data;
console.log('success function resp');
console.log(jqXHR.getAllResponseHeaders());
},
error: function(data){
responseObj = data;
},
data:item,
dataType: "json",
});
Here's my code; i am unable to print response headers; am i missing anything? all that prints out is empty string.
Tried using getResponseHeader("Location"), that's not working either; I am trying to get "Location" header that's being returned for the AJAX call.
However firbeug shows all response headers including "Location" which I am after.
I am using Jquery 1.7.1