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

    Interface HttpRequest

    Describes an outgoing HTTP request to the B2 API.

    interface HttpRequest {
        body?: BodyInit | null;
        headers?: Record<string, string>;
        method: "GET" | "HEAD" | "POST";
        signal?: AbortSignal;
        url: string;
    }
    Index

    Properties

    body?: BodyInit | null

    Request body. Used for POST requests (JSON payloads or file uploads).

    headers?: Record<string, string>

    Request headers. Authorization and content-type are typically included.

    method: "GET" | "HEAD" | "POST"

    HTTP method. B2 uses GET for downloads (HEAD to fetch only headers) and POST for all other operations.

    signal?: AbortSignal

    Optional abort signal for request cancellation.

    url: string

    Fully qualified URL to send the request to.