[]求解关于跨域的具体操作
在request header加上Origin
求解下代码的具体操作
初次接触不知道怎么写
之前我个人写的 不知道是不是在这个里面
var xhr = new XMLHttpRequest();
xhr.open("GET",url, true)
xhr.setRequestHeader("Accept", "*/*");
xhr.setRequestHeader("Content-Type", "application/json");
还是说用参考代码里的HttpRequest()
var xhr = new Laya.HttpRequest();
xhr.http.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xhr.once(Laya.Event.COMPLETE, this, this.completeHandler, [url, loader]);
xhr.once(Laya.Event.ERROR, this, this.errorHandler);
console.log("-----------------send------------------", url);
xhr.send(url, "", "get", "arraybuffer");
求解下代码的具体操作
初次接触不知道怎么写
之前我个人写的 不知道是不是在这个里面
var xhr = new XMLHttpRequest();
xhr.open("GET",url, true)
xhr.setRequestHeader("Accept", "*/*");
xhr.setRequestHeader("Content-Type", "application/json");
还是说用参考代码里的HttpRequest()
var xhr = new Laya.HttpRequest();
xhr.http.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xhr.once(Laya.Event.COMPLETE, this, this.completeHandler, [url, loader]);
xhr.once(Laya.Event.ERROR, this, this.errorHandler);
console.log("-----------------send------------------", url);
xhr.send(url, "", "get", "arraybuffer");
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
Aar0n
赞同来自: