Browser-compatible fetch() (undici), exposed as a static on globalThis.

Stable since Node.js v21.0.0. Usage: Fetch.fetch(url) / Fetch.fetch(url, init), or js.Node.fetch(url).

See also:

Static methods

staticfetch(input:String, ?init:RequestInit):Promise<Response>

staticfetch(input:Request, ?init:RequestInit):Promise<Response>

staticfetch(input:URL, ?init:RequestInit):Promise<Response>

Starts the process of fetching a resource from the network.