type

FetchProxyOption

type FetchProxyOption =
| string
| URL
| false
| { headers: HeadersInit; respectNoProxy: boolean; url: string | URL }

The proxy a fetch() uses.

  • A URL string, a URL, or { url, headers, respectNoProxy } selects that proxy.
  • false connects directly, even when HTTP_PROXY / HTTPS_PROXY / ALL_PROXY are set.
  • undefined uses the proxy environment variables.

Referenced types

class URL

The URL interface represents an object providing static methods used for creating object URLs.

MDN Reference