单个fetch+async
(async() => {
try {
var response = await fetch(url);
var data = await response.json();
console.log(data);
} catch (e) {
console.log("Booo")
}
})();
如何像$.when一样发起多个请求
$.when(...reqArr).done(function (...data) {
}
类似
requestByFetch(urls)
Use Promise.all
The method is Promise.all(), implemented as follows.
soonfy