interface ClientRequest
Since 0.1.0

An outbound JSON request described by application or generated code.

Type Parameters

TBody = unknown

Properties

readonly
method: string

HTTP method.

readonly
path: string

Relative path resolved against the client baseUrl. Must be relative.

readonly
optional
query: Record<
string,
string
| number
| boolean
| (string | number | boolean)[]
| null
| undefined
>

Query values. Primitives are encoded once; arrays repeat the key. Nullish values are omitted.

readonly
optional
headers: HeadersInit

Additional headers merged on top of the client defaults.

readonly
optional
json: TBody

JSON body. When present, Content-Type: application/json is set automatically.

readonly
optional
signal: AbortSignal

Abort signal that cancels fetches and queued waits.

Usage

import { type ClientRequest } from "sdk/src/index.ts";