Skip to main content

bareFetch

@totemsdk/pear


@totemsdk/pear / bareFetch

Function: bareFetch()

bareFetch(url, init?): Promise<FetchResponse>

Polyfill-aware fetch.

  • In environments where globalThis.fetch exists: delegates to it.
  • Otherwise: uses bare-http1 (dynamic import) for HTTP/1.1 requests.

Parameters

url

string

init?

FetchInit = {}

Returns

Promise<FetchResponse>