我需要通过GET发送请求,但是ExtJS更改了选项的方法
我更改了useDefaultXhrHeader,即使我无法发送,我也需要禁用CORS
https://fiddle.sencha.com/#view/editor
Ext.application({
name: 'Fiddle',
launch: function () {
Ext.Ajax.request({
url: 'http://localhost:8888/api/sign/certificates',
method: "GET",
useDefaultXhrHeader : false,
headers: {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*'
},
success: function (response, opts) {
var obj = Ext.decode(response.responseText);
console.dir(obj);
},
failure: function (response, opts) {
console.log('server-side failure with status code ' + response.status);
}
});
}
});发布于 2017-06-14 05:08:11
我认为您想要消除_dc缓存参数,可以这样做
noCache: false,在您的Ext.Ajax.request({})中使用这个
希望这能帮上忙!
https://stackoverflow.com/questions/44463205
复制相似问题