I am unable to fetch any API data from my local Nodejs server using android emulator.
http:
url: 'http://localhost:8000/'
this.data = (await this.http.get<Res>(url + '/' + id).toPromise()).data;
Will work when fetching API as a web app.
ionic serve
Will Not Work when I run my app using android emulator.
via: ionic capacitor run android -l --external
I get an Error:
ERROR Error: Uncaught (in promise): HttpErrorResponse: {"headers":{"normalizedNames":{},"lazyUpdate":null,"headers":{}},"status":0,"statusText":"Unknown Error","url":"http://localhost:8000/","ok":false,"name":"HttpErrorResponse","message":"Http failure response for http://localhost:8000/: 0 Unknown Error","error":{"isTrusted":true}} at resolvePromise (polyfills.js: