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

Waiting for connection to execute network requests. How should it be done?

$
0
0

@kkoych wrote:

Hello,

I am developing an ionic app for iOS and Android. The app use case sometimes may require that the app is used with a spotty or non-existing internet connection. I have some API calls which are done in the app. I am trying to make this app work even with non-optimal internet conditions.

What I came up with is a way to save each critical request and then process it. If there is a normal connection everything should behave normally, however if the connection is spotty, I’m thinking of saving the requests to some kind of local storage and running them periodically until they are done. Since I’m using angular’s HttpClient I get observables which are then consumed, the problem is how to handle the data which is returned from the requests after they finish if they are deferred in this “request queue” I’m building.

I am open to other solutions to the problem at hand. Thank you very much :slight_smile:

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles