$ ionic cordova plugin add cordova-plugin-http
$ npm install --save @ionic-native/http
The implementation is:
constructor(private https: HTTP ) {
}
this.https.get('http://ionic.io', {}, {})
.then(data => {
this.httpData =data;
console.log(data.status);
})
.catch(error => {
console.log(error.status);
});
And I get this error:
[20:49:03] console.warn: Native: tried calling HTTP.get, but the HTTP plugin is not installed. [20:49:03] console.warn: Install the HTTP plugin: 'ionic plugin add cordova-plugin-http'
http
? – Stretcherbearer