ClientConfig
Defined in: src/core/types.ts:423
Properties
Section titled “Properties”baseUrl?
Section titled “baseUrl?”
optionalbaseUrl?:string
Defined in: src/core/types.ts:425
Base URL prepended to all requests
retry?
Section titled “retry?”
optionalretry?:RetryConfig
Defined in: src/core/types.ts:427
Default retry config
timeout
Section titled “timeout”timeout:
ClientTimeoutConfig
Defined in: src/core/types.ts:431
Default timeout config. attemptMs is required — pass Infinity to
explicitly opt out of a per-attempt cap, so “no timeout” is always a
deliberate choice rather than an accidental default.
concurrency?
Section titled “concurrency?”
optionalconcurrency?:number
Defined in: src/core/types.ts:434
Global concurrency across all partitions.
Default
Section titled “Default”maxQueueSize?
Section titled “maxQueueSize?”
optionalmaxQueueSize?:number
Defined in: src/core/types.ts:438
Max requests queued globally (across all partitions) waiting for a concurrency permit before new requests are rejected with QueueFullError.
Default
Section titled “Default”partitions?
Section titled “partitions?”
optionalpartitions?:Record<string,PartitionConfig>
Defined in: src/core/types.ts:442
Per-partition overrides. Partitions not listed here use
defaultPartition. A listed partition does not inherit from it.
Default
Section titled “Default”{}defaultPartition?
Section titled “defaultPartition?”
optionaldefaultPartition?:PartitionConfig
Defined in: src/core/types.ts:448
Config for every partition not listed in partitions, merged the same
way a listed entry is: client → partition → request. Fields left unset
keep their defaults (concurrency DEFAULT_CONCURRENCY,
maxQueueSize DEFAULT_MAX_QUEUE_SIZE).
Default
Section titled “Default”{}circuitBreaker?
Section titled “circuitBreaker?”
optionalcircuitBreaker?:CircuitBreakerConfig
Defined in: src/core/types.ts:450
Default circuit breaker config. Opt-in — inert unless enabled: true.
retryBudget?
Section titled “retryBudget?”
optionalretryBudget?:RetryBudgetConfig
Defined in: src/core/types.ts:452
Default per-partition retry budget. Opt-in — no budget unless set.
rateLimit?
Section titled “rateLimit?”
optionalrateLimit?:RateLimitConfig
Defined in: src/core/types.ts:454
Default per-partition rate limit. Opt-in — no limit unless set.
pauseOnRetryAfter?
Section titled “pauseOnRetryAfter?”
optionalpauseOnRetryAfter?:PauseOnRetryAfterConfig
Defined in: src/core/types.ts:456
Default per-partition pause on Retry-After. Opt-in — no pause unless set.
logger?
Section titled “logger?”
optionallogger?:Logger
Defined in: src/core/types.ts:458
Optional structured logger. A logger that throws never affects a request: the error is rethrown on a microtask (reaching uncaughtException), like a throwing listener.
metrics?
Section titled “metrics?”
optionalmetrics?:MetricsSink
Defined in: src/core/types.ts:460
Optional metrics sink for counters, histograms, and gauges.
redactQuery?
Section titled “redactQuery?”
optionalredactQuery?:boolean
Defined in: src/core/types.ts:463
Redact query parameter values in logged URLs.
Default
Section titled “Default”truefetch?
Section titled “fetch?”
optionalfetch?: {(input,init?):Promise<Response>; (input,init?):Promise<Response>; }
Defined in: src/core/types.ts:465
Custom fetch function (defaults to globalThis.fetch).
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”URL | RequestInfo
RequestInit
Returns
Section titled “Returns”Promise<Response>
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”string | URL | Request
RequestInit
Returns
Section titled “Returns”Promise<Response>
redirect?
Section titled “redirect?”
optionalredirect?:RedirectMode
Defined in: src/core/types.ts:470
Redirect mode passed to fetch on every attempt. Use "manual" when the
caller must vet each hop itself (e.g. an SSRF guard): a 3xx then comes back
as an HttpError whose response carries the Location header.
Default
Section titled “Default”"follow"