I’m having difficulties with native HTTP when I run my app as a native android app.
this.native.get(env.api.native.url + 'quotes', params, this.NATIVE_HEADER)
.then((res: HTTPResponse) => {
if (res.status === 200) {
resolve(res.data)
} else {
reject({ from: 'this.native.get.res.status != 200', res })
}
})
.catch((error: any) => {
reject({ from: 'this.native.get.catch', error })
})
I’m getting this error (in the native.get.catch()):
{
"from": "this.native.get.catch",
"error": {
"__zone_symbol__currentTask": {
"type": "microTask",
"state": "notScheduled",
"source": "Promise.then",
"zone": "angular",
"cancelFn": null,
"runCount": 0
}
}
}
The problem does NOT occur when I run ionic serve -c
and run the app through Ionic DevApp
.
Any help would be greatly appreciated. Thx.