function fetch
fetch(init?: RequestInit,): Promise<Response>Deprecated
Fetch a resource from the network. It returns a Promise that resolves to the
Response to that Request, whether it is successful or not.
const response = await fetch("http://my.json.host/data.json");
console.log(response.status); // e.g. 200
console.log(response.statusText); // e.g. "OK"
const jsonData = await response.json();
optional
init: RequestInitPromise<Response>fetch(init?: RequestInit & { client: Deno.HttpClient; },): Promise<Response>Deprecated
The Fetch API
which also supports setting a Deno.HttpClient which provides a
way to connect via proxies and use custom TLS certificates.
optional
init: RequestInit & { client: Deno.HttpClient; }Promise<Response>