When making an Ext.ajax.request, I am attempting to read the headers of the response that is coming. Here is the code snippet:
Ext.Ajax.request({ url: 'http://localhost:3000/v0.1/login' ,
method: 'POST',
scope:this,
jsonData: {"_username":username,"_userpwd":password},
success: function(responseObject){
var headers = responseObject.getAllResponseHeaders();
console.info(headers );
Ext.destroy(Ext.ComponentQuery.query('#loginWindow'));
this.application.getController('SiteViewController').showView();
},
failure: function(responseObject){
alert(responseObject.status);
}
});
However, when I check the console, only one header is printed out:
Object {content-type: "application/json; charset=utf-8"}
All the other headers are missing from the output, even though they are visible in the Chrome inspector. What could be causing this discrepancy? Any insights would be appreciated. Thanks.