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

    Class DefaultHttpTransport

    The Node.js transport, and the SDK default there. It is the full conformance profile: a private keep-alive connection pool that nothing else in the process shares, a connect timeout separate from the read deadline, at most maxRedirects redirects with caller headers dropped on a cross-origin hop, a streaming body cap that fails one chunk past maxResponseBytes, and a bounded drain on close.

    It uses whatever proxy configuration Node applied to its own global agents at startup (--use-env-proxy or NODE_USE_ENV_PROXY, Node 24.5 / 22.19 and later, reading HTTP_PROXY, HTTPS_PROXY and NO_PROXY), so it agrees with http.globalAgent in every case. A proxy installed on the global fetch through undici.setGlobalDispatcher() is not seen here; an application using one injects FetchHttpTransport instead.

    Bodies are decoded transparently when a server compresses them; the body cap applies to the decoded bytes, which is what the SDK allocates.

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    Methods

    • Stop accepting new work, wait up to closeTimeout milliseconds for calls in flight (redirects included), then destroy whatever remains together with the connection pool. Idempotent; never rejects.

      Parameters

      • OptionalcloseTimeout: number = 0

      Returns Promise<void>

    • Parameters

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

      Returns DefaultHttpTransport