Skip to content

HttpProviderOptions

Defined in: src/providers/web/HttpProvider.ts:51

Options accepted by createHttpProviderFactory.

PropertyTypeDescriptionDefined in
basePath?stringBase URL prefix prepended to relative endpoint paths. Defaults to "".src/providers/web/HttpProvider.ts:57
defaultHeaders?Record<string, string>Default headers applied to every request.src/providers/web/HttpProvider.ts:61
enforceHttps?booleanRejects factory creation when the transport is cleartext http. Defaults to false, where connecting with credentials over cleartext emits a process SecurityWarning instead of failing.src/providers/web/HttpProvider.ts:67
fetch?HttpFetchCustom fetch implementation. Defaults to global fetch.src/providers/web/HttpProvider.ts:59
id?ProviderIdProvider id to register. Defaults to "http". Set to "https" for the HTTPS variant.src/providers/web/HttpProvider.ts:53
secure?booleanWhether the provider should treat connections as TLS-only. Defaults to true when id === "https".src/providers/web/HttpProvider.ts:55