Options for a call. Every client should accept CallOptions as optional argument in its RPC methods.

interface CallOptions {
    contextValues?: ContextValues;
    headers?: HeadersInit;
    signal?: AbortSignal;
    timeoutMs?: number;
    onHeader?(headers): void;
    onTrailer?(trailers): void;
}

Properties

contextValues?: ContextValues

ContextValues to pass to the interceptors.

headers?: HeadersInit

Custom headers to send with the request.

signal?: AbortSignal

An optional AbortSignal to cancel the call. If cancelled, an error with Code.Canceled is raised.

timeoutMs?: number

Timeout in milliseconds.

Set to <= 0 to disable the default timeout.

Methods

  • Called when response headers are received.

    Parameters

    • headers: Headers

    Returns void

  • Called when response trailers are received.

    Parameters

    • trailers: Headers

    Returns void

Generated using TypeDoc