[SOLVED] can't receive data from ionic web service https to http

Issue

I have an ionic app. I need to convert the urls in the web service from https to http. I changed it but I can’t connect to the web service. How can I solve this problem? Thanks.

Http response

Ionic:

   Ionic CLI                     : 6.13.1 (C:\Users\xxx\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 5.5.2
   @angular-devkit/build-angular : 0.1000.8
   @angular-devkit/schematics    : 10.0.8
   @angular/cli                  : 10.0.8
   @ionic/angular-toolkit        : 2.3.3

Cordova:

   Cordova CLI       : 10.0.0
   Cordova Platforms : 6.0.0, android 9.1.0, browser, ios 6.2.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 13 other plugins)

Utility:

   cordova-res : 0.15.3
   native-run  : 1.3.0

System:

   NodeJS : v14.15.3 (C:\Program Files\nodejs\node.exe)
   npm    : 6.14.9
   OS     : Windows 10

Solution

I don’t know, which plugin, which native run time you are using.
But I am using capacitor with @ionic-native/http plugin.
Add "useClearTextTrafffic=’true’" in android manifest’s application tag. That’s it.

Answered By – mani kandan

Answer Checked By – David Marino (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *