const getListIDs = async () => {
const listItems = [];
const urls = [];
for (let i = 0; i < 100; i++) {
urls.push(`/api.php?i=${i}`);
}
const promises = urls.map(async url => await axios.get(url));
await Promise.all(promises).then(results =>
results.forEach(listItems.push)
);
saveToFile(listItems);
};
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.