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

    Class HttpResponse

    The result of one successful HTTP exchange.

    A non-2xx status is a successful exchange: 404 and 503 arrive here carrying their statusCode, and the layer above decides what they mean. Only a failure to obtain a response fails a roundTrip.

    Response header names are ASCII-lowercased and a header may repeat, so headers maps each name to the list of values it carried. body is the whole body, fully buffered, so a request can be replayed without any body-lifecycle discipline at the call site.

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    • Parameters

      • props: {
            body?: Uint8Array<ArrayBufferLike>;
            headers?:
                | Record<string, string | string[]>
                | Iterable<[string, string], any, any>;
            statusCode: number;
        }
        • Optionalbody?: Uint8Array<ArrayBufferLike>

          defaults to an empty body

        • Optionalheaders?: Record<string, string | string[]> | Iterable<[string, string], any, any>
        • statusCode: number

      Returns HttpResponse

    Properties

    body: Uint8Array<ArrayBufferLike>
    headers: Readonly<Record<string, string[]>>

    Lowercased, list-valued response headers.

    statusCode: number

    Accessors

    Methods

    • The first value of a header, looked up by its lowercased name, or null when the response did not carry it.

      Parameters

      • name: string

      Returns null | string