I'm trying to send a GET request from my Android emulator to the laptop on which the emulator is running, using the cordova plugin "cordova-HTTP":
cordovaHTTP.get(
"http://10.0.2.2:80/",
{},
{},
function(response) {
console.log('success called');
},
function(error_response) {console.log('error called'); console.log(error_response.status);}
);
The error callback gets called and the status code is 500 (= internal server error). But on my laptop I can see with tcpdump that no packages are even received. Why does this very simple GET request not work?
When I use Google Chrome on the emulator and navigate to "http://10.0.2.2:80/" everything works fine, I see the dummy page of the Apache2 webserver which is installed on my laptop.