-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Labels
BugPlatform: AndroidAndroid applications.Android applications.Ran CommandsOne of our bots successfully processed a command.One of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.🌐NetworkingRelated to a networking API.Related to a networking API.
Description
Hi All,
I have use XMLHttpRequest for request to server. I have set timeout = 90000ms and my request about 14000ms. But It usually have error.
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = e => {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status === 200) {
console.log("success", xhr.responseText);
} else {
console.warn("error");
}
};
xhr.open(
"POST",
"http://125.234.136.71/index.php?route=apiv4/post_timeout"
);
xhr.setRequestHeader("Content-type", "application/json; charset=utf-8");
xhr.timeout = 90000; // Set timeout to 90 seconds (90000 milliseconds)
xhr.ontimeout = function() {
alert("Timed out!!!");
};
xhr.send();
My request is working on IOS and Postman, but it don't work on Android.
And more, I try set timeout = 0 (Infinite timer ) => it don't work -_-
mnsrv
Metadata
Metadata
Assignees
Labels
BugPlatform: AndroidAndroid applications.Android applications.Ran CommandsOne of our bots successfully processed a command.One of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.🌐NetworkingRelated to a networking API.Related to a networking API.