ClientOptions
Input-shaped client options, including SSE and WebSocket, that mirror what the option helpers configure.
@defjs/core · Type
Signature
interface ClientOptions extends HttpClientOptions { sse?: ClientSSEOptions; webSocket?: ClientWebSocketOptions; }
The user-facing shape of the settings before defaults are applied. createClient does not accept this object; configure a client with option helpers such as withEndpoint. ClientConfig is the resolved counterpart. The HTTP members come from the non-exported HttpClientOptions base and are shown inline.
Members
Prop
Type
sse? ClientSSEOptions | undefinedSSE transport and reconnect options.
webSocket? ClientWebSocketOptions | undefinedWebSocket transport, heartbeat, and reconnect options.
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; } | undefinedHTTP transport overrides; the default resolves global fetch on each call.
interceptors? Interceptor[] | undefinedInterceptors 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; } | undefinedXSRF cookie/header mapping and optional token provider.
withCredentials? boolean | undefinedWhen true, credentials are included with requests.