Quantcast
Channel: nodejs request, loop & promise - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by marton for nodejs request, loop & promise

$
0
0

You need toreturn request.get({... instead of just request.get({

The way you have it now your function(pveId) returns undefined so your Promise.map just registers a bunch of undefined's instead of actual promises.

You should also not mix promises with callbacks, use request-promise instead of request.


Viewing all articles
Browse latest Browse all 2

Trending Articles



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