Open justsml opened 4 years ago
fetch()
const controller = new AbortController();
const signal = controller.signal;
const timer = setTimeout(() => controller.abort(), 5000);
fetch(url, { signal }).then(response => {
return response.text();
}).then(text => {
console.log(text);
clearTimeout(timer);
});
TODO