A simple adapter interface that allows you to define a custom http client that astra-db-ts may use to make requests.

See FetchH2 and FetchNative for example implementations.

interface Fetcher {
    close?(): Promise<void>;
    fetch(info): Promise<FetcherResponseInfo>;
}

Methods

Methods

  • Makes the actual API request for the given request information. Please take all request information into account when making the request, or you may run into errors or unexpected behavior from your implementation.

    Parameters

    Returns Promise<FetcherResponseInfo>