Headers type
Params type
State type
OptionalattemptThe base URL for all requests.
OptionalcacheA string indicating how the request will interact with the browser's cache to set request's cache.
OptionalcacheCache policy configuration.
OptionalcookiesCookie management configuration.
true enables a basic in-memory cookie jar with RFC 6265 defaults.
Pass a CookieConfig to configure persistence adapters, limits, or
domain exclusions. For full control (init/flush/jar access), use
plugins: [cookiePlugin(config)] instead.
OptionalcredentialsA string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials.
OptionaldedupeDeduplication policy configuration.
OptionaldefaultThe default type of response expected from the server.
OptionaldetermineOptionalgenerateCustom function to generate request IDs for tracing.
When omitted, uses generateId from @logosdx/utils.
OptionalheadersThe headers to be set on all requests.
OptionalintegrityA cryptographic hash of the resource to be fetched by request. Sets request's integrity.
OptionalkeepaliveA boolean to set request's keepalive.
OptionalmethodThe headers to be set on requests of a specific method.
OptionalmethodURL parameters to be set on requests of a specific method.
OptionalmodeA string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode.
OptionalnameOptional name for this FetchEngine instance.
OptionalonOptionalonOptionalonOptionalparamsURL parameters to be set on all requests.
OptionalpluginsPlugins to install at construction time.
Each plugin's install() is called with the engine instance.
Cleanup functions are collected and called on destroy().
OptionalpriorityOptionalrateRate limit policy configuration.
OptionalredirectA string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect.
OptionalreferrerA string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer.
OptionalreferrerA referrer policy to set request's referrerPolicy.
OptionalrequestHeader name for sending the request ID with every request.
When set, each outgoing request includes this header with the
generated requestId value, enabling end-to-end distributed tracing.
OptionalretryOptionalspySpy function that receives all event emissions.
OptionaltotalOptionalvalidateValidators for headers, params, and state.
OptionalwindowCan only be null. Used to disassociate request from any Window.
Full configuration options for FetchEngine.
This is the primary configuration interface. It's defined here independently of the FetchEngine class to avoid circular dependencies.
Extends native fetch RequestInit to allow instance-level defaults for options like
credentials,mode,cache,redirect, etc.