mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 04:39:10 +00:00
11 lines
351 B
TypeScript
11 lines
351 B
TypeScript
async function request(url: string, options: any) {
|
|
try {
|
|
await (await fetch(url, options)).text();
|
|
} catch {
|
|
}
|
|
}
|
|
|
|
await request("http://localhost:4545/echo.ts");
|
|
await request("http://localhost:4545/not-found");
|
|
await request("http://unreachable-host.abc/");
|
|
await request("http://localhost:4545/echo.ts", { signal: AbortSignal.abort() });
|