HttpConnectOptions
Defined in: src/client/types.ts:10
Options for httpConnect, the HTTP-transport RPC client.
Properties
Section titled “Properties”acceptedMaxResponseBytes?
Section titled “acceptedMaxResponseBytes?”optional acceptedMaxResponseBytes?: number;Defined in: src/client/types.ts:49
Decoded response bytes accepted by this client and advertised on every HTTP request. Minimum 64 KiB. Defaults to 64 MiB in browser/workerd builds and 256 MiB in native builds.
authorization?
Section titled “authorization?”optional authorization?: string;Defined in: src/client/types.ts:36
Authorization header value (e.g. “Bearer
compressionLevel?
Section titled “compressionLevel?”optional compressionLevel?: number;Defined in: src/client/types.ts:34
When set, request bodies are zstd-compressed at this level and Accept-Encoding: zstd is sent. Omit to disable compression.
description?
Section titled “description?”optional description?: ServiceDescription;Defined in: src/client/types.ts:18
Statically declared service description. When supplied, the client uses these method and stream schemas directly and does not introspect at all. This is required for services that intentionally expose only their declared RPC surface and for exact exchange input schemas that cannot be recovered by inspecting runtime values.
externalLocation?
Section titled “externalLocation?”optional externalLocation?: ExternalLocationConfig;Defined in: src/client/types.ts:38
External storage config for resolving externalized batches.
fetch?
Section titled “fetch?”optional fetch?: typeof fetch;Defined in: src/client/types.ts:45
Request implementation used for every HTTP operation owned by this
client, including introspection and upload-URL exchange. Defaults to the
runtime’s global fetch. Node callers normally use
httpConnectSocks5h instead of setting this directly.
onLog?
Section titled “onLog?”optional onLog?: (msg) => void;Defined in: src/client/types.ts:32
Callback invoked for each log/error message the server emits during a request.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
msg |
LogMessage |
Returns
Section titled “Returns”void
prefix?
Section titled “prefix?”optional prefix?: string;Defined in: src/client/types.ts:30
Route prefix the server mounts its methods under (e.g. /api). Trailing slashes are stripped. Defaults to no prefix.
protocol?
Section titled “protocol?”optional protocol?: string;Defined in: src/client/types.ts:28
Which protocol to bind to, skipping reflection’s list_protocols hop.
Introspection is two round trips – what does this server host, then describe one of them – because a server may host several and there is no longer a single “the” protocol to ask about without asking. Naming one here answers the first question locally. Defaults to the first hosted protocol that is not framework-reserved.
