Please help me to figure out with CORS on my Ionic2/Angular2 application. I'm trying to get data with http 'GET' request. When I'm running '$npm run build' at laptop, I get an expected response. When I'm running '$ cordova run android', I always get 'Response with status: 0 for URL: null'. Here is the code snippet:
this.http.get('https://httpbin.org/ip')
.subscribe((data: any) => {
this.result = data._body; // {"origin": "31.43.103.88"} on laptop
}, error => {
this.result = error; // 'Response with status: 0 for URL: null' on android
});
Thanks.