Allows you to use your own custom HTTP request strategy, rather than the default fetch or fetch-h2 implementations.
It may also be used to wrap an existing Fetcher implementation (i.e. FetchNative or FetchH2) with your own custom logic or to add extra logging/debug information.
See the Fetcher classes for details on implementing your own custom fetcher, along with a checklist of things to consider.
Be wary of the potential for errors or unexpected behavior if you do not take all request information into account when making the request, or make some other mistake with the fetcher.
Overview
Allows you to use your own custom HTTP request strategy, rather than the default
fetch
orfetch-h2
implementations.It may also be used to wrap an existing Fetcher implementation (i.e. FetchNative or FetchH2) with your own custom logic or to add extra logging/debug information.
Implementation Details
See the Fetcher classes for details on implementing your own custom fetcher, along with a checklist of things to consider.
Be wary of the potential for errors or unexpected behavior if you do not take all request information into account when making the request, or make some other mistake with the fetcher.
Example
Examples
For advanced examples & more information, see the
examples/customize-http
directory in the astra-db-ts repositorySee