Ionic get array from json - web service

i’m using

 import { HTTP } from '@ionic-native/http/ngx';

for http requests from ionic app. But it doesn’t working for me.

This codes from ionic framework documentation:

import { HTTP } from '@ionic-native/http/ngx';

constructor(private http: HTTP) {}

this.http.get(myJsonApiUrl, {}, {})
  .then(data => {

    console.log(; // data received by server

  .catch(error => {

    console.log(error.error); // error message as string


This code not displaying error detail. Only display : “undefined” for error.error

sorry for my english.

Angular’s HttpClient is much more user-friendly. I would recommend using that instead. If you are going to respond with “I was doing that, and then I ran into CORS trouble”, then I’m going to say “CORS should really be fixed on the server side, not kludged around on the client side”.

What is the Result when you just log the error?