D
D
Dalve2016-07-19 10:22:15
JavaScript
Dalve, 2016-07-19 10:22:15

How to send requests to the server in an application written with Apache Cordova?

There was a problem when sending a GET request through an application written with Apache Cordova. The application tried to do in VS and Intel XDK. Tested in the native xdk emulator, in ripple and on a full-fledged emulator from android sdk. I also tried to run in the browser, the result is the same.
There are no errors.
Creating and sending a request:

var get = new XMLHttpRequest();
get.open('GET', 'https://api.lootbox.eu/pc/eu/techfreak-2462/achievements', true);
get.send();
console.log(get.status); //результат 0
console.log(get.readyState);// результат 1

What could be the problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question