I am trying to use HTTP ionic-native/http/ngx in place of HTTPClient angular/common/http.
I tried to follow examples from : https://ionicframework.com/docs/native/http
https://www.freakyjolly.com/ionic-native-http-plugin-tutorial-with-example/#.XyHQ8igzaUk
https://www.youtube.com/watch?v=ApSskiMT2_8
but encountered many errors such as "Error cordova not available".
Not sure where I went wrong, but these are the steps I followed:
(1)Install Native HTTP Plugin
(2)Import in App.component.ts and under initialiseApp() (this.http.setServerTrustMode("nocheck")....)
(3)Import in App Module
(4)Inject HTTP into the constructor of home.page.ts (by the way, my actual function makes the HTTP call resides in a service)
(5)Invokes the HTTP call using http.sendRequest
What am I missing out? My objective is very simple: I want to be able to let Ionic bypass the self-signed certificate check OR to trust the self signed cert in Ionic.