Interface: TransportRequest
Defined in: src/core/transport.ts:18
What request() hands a Transport: everything about one HTTP call, with the
query kept separate from the URL.
Remarks
url is query-free on purpose: error messages and logging interceptors see the URL,
and an API key rides in query. Auth providers add headers / query before the
transport sees the request.
Properties
body?
optionalbody?:unknown
Defined in: src/core/transport.ts:33
Request body (POST). Strings / URLSearchParams are sent as-is, objects as JSON.
headers?
optionalheaders?:Record<string,string>
Defined in: src/core/transport.ts:31
Request headers; request() adds the family User-Agent unless one is set here or by auth.
method
method:
"GET"|"POST"
Defined in: src/core/transport.ts:20
HTTP method; the built-in transports support GET and POST.
query?
optionalquery?:Record<string,unknown>
Defined in: src/core/transport.ts:29
Query params; undefined / null values are dropped. An array value
repeats the key ({ k: ["a", "b"] } → k=a&k=b, as sdv-py / requests
sends) — never k[]=a. Every built-in transport encodes the same way
(encodeQuery).
responseType?
optionalresponseType?:"json"|"text"|"arraybuffer"
Defined in: src/core/transport.ts:41
How to decode the body. "json" (default) parses JSON when the body is JSON
and otherwise hands back the raw text; "text" always returns the text;
"arraybuffer" returns the raw bytes.
timeoutMs?
optionaltimeoutMs?:number
Defined in: src/core/transport.ts:35
Per-request timeout in milliseconds; request() fills in the family's when absent.
url
url:
string
Defined in: src/core/transport.ts:22
Absolute URL without the query string.