jeudi 30 mars 2017

Proper Asynchronous Request Handling - JS

I am making a food finding web application. The application makes two requests, the first is to the MapBox API to load a map and the second is to the Yelp Fusion API (through my node server). The through throttling testing I have found that the MapBox Call takes aproximately 1/2 the time to complete as the Yelp Call.

I am a bit confused how to manage the two requests. Do I load one and then the next? Do I load them both and then create two input functions to account for the Yelp loading first/ the MapBox loading first?

Thanks.




Aucun commentaire:

Enregistrer un commentaire