NF
Size: a a a
NF
🦜
Л
S
🦜
NF
u
function fetchWrap(url, options, timeout) {А потом это обернуть в
return new Promise((resolve, reject) => {
fetch(url, options).then(resolve, reject)
if (timeout) {
setTimeout(reject, timeout, new Error('request timeout'))
}
})
}
const result = Promise.allSettled([
fetchWrap('/path', {}, 60000),
fetchWrap('/newpath', {}, 60000)
])
Л
S
S
🦜
S
S
Л
u
function fetchWrap(url, options, timeout) {А потом это обернуть в
return new Promise((resolve, reject) => {
fetch(url, options).then(resolve, reject)
if (timeout) {
setTimeout(reject, timeout, new Error('request timeout'))
}
})
}
const result = Promise.allSettled([
fetchWrap('/path', {}, 60000),
fetchWrap('/newpath', {}, 60000)
])
S
S
S
S
SS