Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

想问个问题目前XMLHttpRequest连线API是否能在android平台(cocos-creator 2.2.2) #2332

Open
Saneypig opened this issue Mar 26, 2020 · 0 comments

Comments

@Saneypig
Copy link

Saneypig commented Mar 26, 2020

var xhr = cc.loader.getXMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState == 4 && (xhr.status >= 200 && xhr.status <= 207)) {
console.log(this.responseText);
reply(this.responseText);
} else {
MAIN.logString(0,"error"+xhr.status)
console.log("error : " + this.onload);
}
});
在H5 xhr.status 是200
在android xhr.status 是25140

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant