Trying to access the following API but keep getting an error when access it. The url is correct and works perfectly when run through postman.
let data = this.http.get<any>('http://chargepoints.dft.gov.uk/api/retrieve/registry/lat/53.790224/long/-1.563929/dist/3/format/json');
Just this call alone returns this error
CONSOLE ERROR
file:///app/tns_modules/@angular/core/bundles/core.umd.js:15769:28:
ERROR {
"headers": {
"normalizedNames": {},
"lazyUpdate": null,
"headers": {}
},
"status": 0,
"statusText": "Unknown Error",
"url":"http://chargepoints.dft.gov.uk/api/retrieve/registry/lat/53.790224/long/-1.563929/dist/3",
"ok": false,
"name": "HttpErrorResponse",
"message": "Http failure response for http://chargepoints.dft.gov.uk/api/retrieve/registry/lat/53.790224/long/-1.563929/dist/3: 0 Unknown Error",
"error": {
"line": 1298,
"column": 38,
"sourceURL": "file:///app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js",
"originalStack": "ZoneAwareError@file:///app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:1298:38\nfile:///app/tns_modules/tns-core-modules/http/http-request/http-request.js:97:37\nUIApplicationMain@[native code]\n_start@file:///app/tns_modules/tns-core-modules/application/application.js:275:26\nrun@file:///app/tns_mo<…>
If I simply change the path to a different api it works absolutely fine. Can anyone point me in the right direction as to what i'm missing.
So i've updated the AndroidManifest and that works fine now, however via iOs I still get the same problem.