DropInClientOptions
Properties
Section titled “Properties”apiKey
Section titled “apiKey”apiKey: string;fetch?
Section titled “fetch?”optional fetch?: (input, init?) => Promise<Response>;Transport, defaulting to the global fetch. Every request this client makes goes
through it, the 401 replay included.
The point is testing without a network: @dropinnodex/testing hands over an
in-memory dropin as a fetch, and the REAL client runs above it — token caching, the
single-flight refresh, the retry-once rule, error parsing, cursor encoding. A fake
that implemented this class’s interface instead would bypass exactly the code most
worth exercising. Also useful for a custom agent, a proxy, or instrumentation.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
string | URL | Request |
init? |
RequestInit |
Returns
Section titled “Returns”Promise<Response>
tokenProvider
Section titled “tokenProvider”tokenProvider: () => Promise<string>;Called on init and again on a 401 — the same contract GetStream’s SDK uses.
Returns
Section titled “Returns”Promise<string>
optional url?: string;Base URL of the dropin API. Defaults to https://api.getnodex.cloud; set it to point
at staging, a proxy, or a local server — e.g. http://localhost:3000. No trailing slash.