我使用ExtJS进行XMLHttpRequest请求到一个服务,该服务不返回responseText,只返回204以及响应头TotalNearby。在Firefox浏览器中这个调用完美运行,但是在Internet Explorer 8中,两个警告框都为空。我做错了什么?
Ext.Ajax.request({
url: 'services/getNearby',
method: 'GET',
params: {
'lat': 34,
'lon': -90
},
headers: {
'Authorization': AUTH_TOKEN
},
success: function(response) {
if (response.status == 204) {
alert(response.getAllResponseHeaders());
alert(response.getResponseHeader('Total-Nearby'));
}
},
failure: function(response) {
alert('Server status ' + response.status);
}
});