Last active
December 20, 2018 15:36
-
-
Save jsiesquen/a72ac413e88ecf31dc87e28651b011af to your computer and use it in GitHub Desktop.
Using request-promise-native module include within a constructor Lambda. Check https://stackoverflow.com/questions/50468120/nodejs-request-get-body
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let msurls = ["http://example.org", "http://example.org"] | |
let request = require ("request-promise-native") | |
async function doRequests () { | |
return await (Promise.all ( | |
msurls.map (async msurl => await request (msurl))) | |
) | |
} | |
doRequests (). then (msresult => console.log (msresult)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment