我試圖在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"}
所有其他的頭不見了,但它們存在於鉻檢查員!
我錯過了什麼?由於