<分区>
我正在从多个网址抓取内容。 Fetch api 到处都使用 promises。
所以我的一个请求代码是这样的
fetch(url).then((response)=>response.text()).then(function(html) {//stuff });
现在我有一组 url 并且将进行多个调用我怎么知道是否所有调用都已完成。
我尝试使用 Promise.all
但如果您看到每个请求都有两个 promise 。有没有更好的方法,Promise.all 支持也不是很好。