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.
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 thehttpOptions
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 thefetch
'sRequestInit
, for example to use a custom UndiciDispatcher
to further customize the HTTP options.See the below-mentioned
examples/customize-http
directory for examples & more information about extendingFetchNative
.Examples
For advanced examples & more information, see the
examples/customize-http
directory in the astra-db-ts repositorySee
HttpOptions