Tuesday, 15 October 2019

Express question promise.all with request

Long time programmer, newish to javascript and express.I'm using an express server to call out to various sites APIs to present a simpler api to my web site. Also planning to add a backend db etc etc.In the UI i am using fetch which returns a promise. In the express server I am using "request" which does not return a promise. For one set of data I need to make multiple APIs calls, So i need to wait for all of them to return, this is the purpose of promise.all. Is there something equivalent when using request or should I use a different package if i need to wait on multiple calls?

Submitted October 15, 2019 at 02:16PM by Sislar

No comments:

Post a Comment