@backblaze-labs/b2-sdk - v0.1.0
    Preparing search index...

    Interface HttpResponse

    Represents a parsed HTTP response from the B2 API.

    interface HttpResponse {
        body: ReadableStream<Uint8Array<ArrayBufferLike>> | null;
        headers: Headers;
        status: number;
        arrayBuffer(): Promise<ArrayBuffer>;
        json<T>(): Promise<T>;
        text(): Promise<string>;
    }
    Index

    Properties

    body: ReadableStream<Uint8Array<ArrayBufferLike>> | null

    Response body as a readable stream, or null for empty responses.

    headers: Headers

    Response headers.

    status: number

    HTTP status code.

    Methods

    • Reads the response body as an ArrayBuffer.

      Returns Promise<ArrayBuffer>

    • Parses the response body as JSON.

      Type Parameters

      • T

      Returns Promise<T>

    • Reads the response body as a UTF-8 string.

      Returns Promise<string>