我试图在Ext.ajax.request上读取即将到来的响应标头。ExtJS 4.2.1:无法在Ext.ajax.request回调时检索HTTP响应标头
这是代码:
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);
}
});
但是,它是在控制台打印出来的只有头:
Object {content-type: "application/json; charset=utf-8"}
所有其他的头不见了,但它们存在于铬检查员!
我错过了什么?由于