Skip to content

RequestOptions

@blobs/sdk v0.1.0


@blobs/sdk / transport / RequestOptions

Defined in: transport/Transport.ts:41

Per-request options accepted by every transport’s request methods.

Mirrors a subset of the Fetch API (RequestInit) but adds SDK-only knobs for cache control, host override (used to route auth calls to a separate auth server), and a custom timeout.

Properties

method?

optional method?: string

Defined in: transport/Transport.ts:43

HTTP method (used by legacy request paths; the unified request() derives it from RequestAction).


headers?

optional headers?: Record<string, string>

Defined in: transport/Transport.ts:45

Extra headers merged on top of the transport defaults.


body?

optional body?: any

Defined in: transport/Transport.ts:47

Request body (objects are JSON-encoded by HTTP/WS transports).


signal?

optional signal?: AbortSignal

Defined in: transport/Transport.ts:49

Abort signal for cancellation.


timeout?

optional timeout?: number

Defined in: transport/Transport.ts:51

Per-request timeout in milliseconds.


hostOverride?

optional hostOverride?: string

Defined in: transport/Transport.ts:53

Override the configured base URL for this single request (used to send auth calls to a separate auth server).


cache?

optional cache?: string | boolean

Defined in: transport/Transport.ts:55

true enables auto-generated cache key, a string sets a custom key, false disables caching for this request.


skipCache?

optional skipCache?: boolean

Defined in: transport/Transport.ts:57

Skip the cache read step even if cache is configured.


invalidate?

optional invalidate?: string[]

Defined in: transport/Transport.ts:59

Cache keys to invalidate after a successful response.


cacheTtl?

optional cacheTtl?: number

Defined in: transport/Transport.ts:61

Custom TTL (ms) for this request’s cache entry.