Skip to content

Instantly share code, notes, and snippets.

@jsiesquen
Last active December 20, 2018 15:36
Show Gist options
  • Save jsiesquen/a72ac413e88ecf31dc87e28651b011af to your computer and use it in GitHub Desktop.
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
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