Restate Typescript SDK
    Preparing search index...
    type ConnectionOpts = {
        fetch?: typeof globalThis.fetch;
        headers?: Record<string, string>;
        journalValueCodec?: JournalValueCodec;
        retry?: clients.RetryPolicy | boolean;
        serde?: Serde<any>;
        url: string;
    }
    Index

    Properties

    fetch?: typeof globalThis.fetch

    Custom fetch client

    Allows you to provide a different fetch implementation (e.g., undici fetch for HTTP/2 support).

    globalThis.fetch

    headers?: Record<string, string>

    Headers to attach on every request. Use this to attach authentication headers.

    journalValueCodec?: JournalValueCodec

    Codec to use for input/outputs. Check JournalValueCodec for more details

    retry?: clients.RetryPolicy | boolean

    Opt in to automatic retries of ambiguous ingress failures (network errors, HTTP 429, HTTP 5xx).

    Retries are disabled by default. Set true to enable the built-in policy (RetryPolicy), or pass a RetryPolicy to tune it.

    Even when enabled, retries fire only when an idempotencyKey is set on the call — without one a retry could double-execute a non-idempotent invocation. With a key, Restate dedupes the request, so a retry safely attaches to the in-flight or completed invocation instead of starting a new one.

    serde?: Serde<any>

    Default serde to use for ingress payloads when no operation-specific serde is provided. Applies to handler calls, workflow attaches/output polling, awakeable resolution, and attached invocation results.

    Defaults to restate.serde.json.

    url: string

    Restate ingress URL. For example: http://localhost:8080