FunctionsfetchWithTimeoutfetchWithTimeout CallablefetchWithTimeout(input: URL | RequestInfo, init?: RequestInit, timeout?: number): anyPerforms a fetch operation with a timeout.@example// Perform a fetch request with a timeout of 3000msfetchWithTimeout("https://api.example.com/data", { method: "GET" }, 3000) .then(response => { console.log("Success:", response); }) .catch(error => { console.error("Error:", error); });
Performs a fetch operation with a timeout.