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

    Class HttpRequest

    One HTTP exchange, as handed to an HttpTransport.

    • url is absolute and already resolved. The transport never joins anything.
    • body and contentType are null on a bodyless request.
    • headers is never null. An empty map is the absence of headers, and header names are lowercase. Request headers are single-valued.
    • deadline bounds the whole exchange in milliseconds, body included, not time-to-first-byte. A transport must abandon the exchange and fail with timeout-error when it elapses. It is null when the caller imposes no bound of its own.

    Instances are immutable. Derive a changed copy with new HttpRequest({ ...request, deadline: 1000 }).

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Parameters

      • props: {
            body?: null | Uint8Array<ArrayBufferLike>;
            contentType?: null | string;
            deadline?: null | number;
            headers?: Record<string, string>;
            method: string;
            url: string;
        }
        • Optionalbody?: null | Uint8Array<ArrayBufferLike>
        • OptionalcontentType?: null | string
        • Optionaldeadline?: null | number

          milliseconds, >= 0

        • Optionalheaders?: Record<string, string>
        • method: string

          one of HttpMethod

        • url: string

          absolute http:// or https:// URL

      Returns HttpRequest

    Properties

    body: null | Uint8Array<ArrayBufferLike>
    contentType: null | string
    deadline: null | number

    Bound for the whole exchange in milliseconds, or null.

    headers: Readonly<Record<string, string>>

    Lowercased, single-valued request headers.

    method: string
    url: string

    Methods

    • Parameters

      • value:
            | HttpRequest
            | {
                body?: null
                | Uint8Array<ArrayBufferLike>;
                contentType?: null | string;
                deadline?: null | number;
                headers?: Record<string, string>;
                method: string;
                url: string;
            }

      Returns HttpRequest