wymsee / cordova-HTTP

Cordova / Phonegap plugin for communicating with HTTP servers. Allows for SSL pinning!
MIT License
372 stars 301 forks source link

cordovaHTTP.get sends no data but claims internal server error (500) #163

Open R-obert opened 4 years ago

R-obert commented 4 years ago

Hello,

I'm trying to send a GET request from my Android emulator to the laptop on which the emulator is running:

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. But on my laptop I can see with tcpdump that no packages are even received. Why does cordovaHTTP claim that the problem is on the server side and how do I track down the cause of this?

Note that 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.

Best regards, Robert