mirror of https://github.com/axmolengine/axmol.git
Fixed a bug that xhr cross-domain error
This commit is contained in:
parent
010cb23ead
commit
400b2d7663
|
@ -107,10 +107,10 @@ var XHRTestLayer = cc.Layer.extend({
|
|||
//set arguments with <URL>?xxx=xxx&yyy=yyy
|
||||
if(cc.sys.isNative){
|
||||
xhr.open("GET", "http://geek.csdn.net/news/detail/33683", true);
|
||||
xhr.setRequestHeader("Accept-Encoding","gzip,deflate");
|
||||
}else{
|
||||
xhr.open("GET", "http://httpbin.org/get?show_env=1", true);
|
||||
}
|
||||
xhr.setRequestHeader("Accept-Encoding","gzip,deflate");
|
||||
|
||||
xhr.send();
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue