Answer the question
In order to leave comments, you need to log in
QML Android. XMLHttpRequest only works with wifi enabled, why?
I use this structure to get data from the site:
var request = new XMLHttpRequest()
request.open("GET", url)
request.onreadystatechange = function () {
console.log("ready") // - это первое сообщение
if (request.readyState === XMLHttpRequest.DONE) {
if (request.status === 200) {
var jsonObject = JSON.parse(request.responseText)
loaded(jsonObject)
} else {
console.log("HTTP request failed", request.status)
errMessage.text = "Ошибка соединения с сервером :-("
}
}
}
request.send()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question