Interface FetchHttpClientOptions

Overview

The default http client used by the Data API client, which is the native fetch API.

Passing in httpOptions: { client: 'fetch' } is equivalent to not setting the httpOptions at all.

Polyfilling fetch

See https://github.com/BuilderIO/this-package-uses-fetch for info about polyfilling fetch for your environment.

Customizing fetch

You may extend the FetchNative class to customize the fetch's RequestInit, for example to use a custom Undici Dispatcher to further customize the HTTP options.

See the below-mentioned examples/customize-http directory for examples & more information about extending FetchNative.

Examples

For advanced examples & more information, see the examples/customize-http directory in the astra-db-ts repository

See

HttpOptions

interface FetchHttpClientOptions {
    client: "fetch";
}

Properties

Properties

client: "fetch"

Tells the Data API client to use the native fetch API for making HTTP requests.

See HttpOptions for the other options available.