Untitled
unknown
plain_text
2 years ago
382 B
6
Indexable
function parallelHttpRequests(urls, limit, callback) {
if(!urls.length){
return
}
const arrayResponse = []
let limitCount = 0
const getData = (index) =>{
const urlResponse = axios.get(urls[index]).then((res)=>{
arrayResponse[index] = res.data
++limitCount
getData(index + 1)
})
}
}Editor is loading...
Leave a Comment