hello guys, i have some trouble with ionic-native/http
import { HTTP } from '@ionic-native/http';
jsonTest(){
var json_url = "http://next5.kz/json.php";
this.http.get(json_url, {}, {}).then(data => {
console.log(data);
console.log(data.status);
console.log(data.data); // data received by server
console.log(data.headers);
})
.catch(error => {
console.log(error.status);
console.log(error.error); // error message as string
console.log(error.headers);
});
}
i’m getting error
util.js:60 Native: tried calling HTTP.get, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator
how can i fix it?
thanx