Answers for "node js sleep between axios"

0

node js sleep between axios

const bluebird = require('bluebird')

async function makeRequests (lines) {
  await bluebird.map(
    lines,
    async (line) => {
      const encodedLink = encodeURI(line.link)
      const response = await axios.get(encodedLink)
      // ...your response handling code here...
    },
    { concurrency: 3 }
  )
}

makeRequests(jsonParsed)
Posted by: Guest on December-05-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language