Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70434

HTTP native request

$
0
0

@aquinaswuwua wrote:

Hey,

I am using the ‘ionic-native/http’ package in my project in order to make request on the android platform.

  1. the first problem I face is that the response received by the app is very slow when I am using ‘ionic capacitor run android’ command and android studio, it takes around 10-15 seconds to get the response ( from ‘https://jsonplaceholder.typicode.com/todos/10’). Is it normal?
  2. the second issue is about using http plugin in general. Following docs I got an error saying that plugin is not ready. I googled the issue and solve it by adding in app.component the following line:

`import { HTTP } from ‘@ionic-native/http’;

this.platform.ready().then(() => {
(…)
this.http = HTTP;
});`

But maybe it is not the proper solution.

Thank you for the help in advance!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>