I'm facing a challenge in processing multiple AJAX requests using axios. The goal is to handle an unknown number of requests (1 or more) and manage their responses effectively. Here's what I have so far:
let urlArray = [] // dynamic array of URLs
axios.all(urlArray)
.then(axios.spread(function () {
let temp = [];
for (let i = 0; i < arguments[i].length; i++)
temp.push(arguments[i].data);
}));
The issue lies in the fact that the arguments
variable contains the string URLs instead of the actual response data. How can I overcome this obstacle?