@hiero-ledger/sdk
    Preparing search index...

    Class HttpTransportConfiguration

    How the SDK builds its own HttpTransport. It is ignored when an application injects a transport, since an injected one brings its own connect timeout, redirect bound and body cap.

    Every field has a default, and no construction path yields a partially defaulted instance: new HttpTransportConfiguration({ connectTimeout: 2000 }) keeps every other field at its default. Derive a changed copy from an existing value with new HttpTransportConfiguration({ ...configuration, maxRedirects: 0 }).

    Index

    Constructors

    • Parameters

      • Optionalprops: {
            connectTimeout?: number;
            defaultHeaders?: Record<string, string>;
            maxRedirects?: number;
            maxResponseBytes?: number;
        } = {}
        • OptionalconnectTimeout?: number

          TCP connect plus TLS handshake bound in milliseconds. 0 (the default) keeps the platform stack's own bound, not "no bound". Browsers and React Native cannot express a connect bound and ignore it.

        • OptionaldefaultHeaders?: Record<string, string>

          headers the SDK-built transport adds to every request, below every other source.

        • OptionalmaxRedirects?: number

          redirects followed by the Node transport, default 5. Browsers apply their own fixed bound.

        • OptionalmaxResponseBytes?: number

          cap on a response body, default 32 MiB. A larger body fails with response-too-large-error rather than being truncated.

      Returns HttpTransportConfiguration

    Properties

    connectTimeout: number
    defaultHeaders: Readonly<Record<string, string>>
    maxRedirects: number
    maxResponseBytes: number

    Methods

    • Parameters

      • value:
            | undefined
            | null
            | HttpTransportConfiguration
            | {
                connectTimeout?: number;
                defaultHeaders?: Record<string, string>;
                maxRedirects?: number;
                maxResponseBytes?: number;
            }

      Returns HttpTransportConfiguration