ClientConfig
Resolved client configuration after option helpers have been applied.
@defjs/core · Type
Signature
interface ClientConfig extends HttpClientConfig { sse: ClientSSEConfig; webSocket: ClientWebSocketOptions; }
The snapshot that createClient builds, that every option helper mutates, and that instances from createClient hold. The HTTP members come from a non-exported HttpClientConfig base and are shown inline.
Before any option applies, endpoint is '', interceptors is empty, and http.handle and sse.handle share a default wrapper that resolves globalThis.fetch on each call. Replacing Fetch after import affects both defaults. Core can be imported without Fetch; a default HTTP/SSE execution fails with ENV_UNSUPPORTED if it is still missing. Custom handles do not require a global Fetch. webSocket.handle is globalThis.WebSocket, and the other webSocket settings are unset. withXSRF fills xsrf.cookieName with XSRF-TOKEN and xsrf.headerName with X-XSRF-TOKEN when they are omitted.
Members
Prop
Type
sse ClientSSEConfigResolved SSE configuration.
webSocket ClientWebSocketOptionsResolved WebSocket configuration.
endpoint stringBase URL prepended to relative request paths.
headers? Headers | undefinedStatic default headers merged under headers returned by the builder for HTTP/SSE.
http { handle: FetchHandle; }HTTP transport with a required fetch handle.
interceptors Interceptor[]Interceptors applied in registration order.
querySerializer? QuerySerializer | undefinedSerializes encoded query objects. Omit to use URLSearchParams.
xsrf? { cookieName: string; headerName: string; tokenProvider?: (context: { request: HttpRequest; }) => string | null | undefined; } | undefinedResolved XSRF settings when enabled.
withCredentials? boolean | undefinedWhen true, credentials are included with requests.