OptionalfetchCustom fetch implementation (defaults to global fetch)
Optionalinit: RequestInitOptionalinit: RequestInitOptionalheadersDefault headers to include in all requests
OptionalinterceptorsRequest/response/error interceptors registered at construction time.
Equivalent to calling client.http.interceptors.*.use(...) after creation.
Market ID to scope all requests to
OptionalprivatePrivate storefront key, sent as the x-storefront-private-key header.
SERVER-SIDE ONLY. Never pass this in code that runs in the browser — it grants
elevated access and would be readable by any end user. The client throws a
StorefrontConfigError if this is set while a window global exists.
Public storefront key, sent as the x-api-key header. Safe to expose in the browser.
OptionaltimeoutPer-request timeout in milliseconds. Defaults to 10 000.
Without it a connection that stalls rather than fails hangs forever: fetch
has no timeout of its own, so the request never settles and neither does
whatever awaits it. Server-side that holds a Nitro handler — and its socket —
open indefinitely, which is how a single stalled call turns into a page that
never renders.
Applies to every attempt separately, retries included, so a request that is retried after a 401 refresh gets a full budget rather than a shrinking one.
Set 0 to disable and wait indefinitely. Only sensible for genuinely
long-running calls, and never on a path that serves a page.
Base URL of the Avvyr API (e.g. "https://api.avvyr.com")