Developers
TypeDoc Reference
Functions
createMixFetch

@nymproject/mix-fetchDocs


@nymproject/mix-fetch / createMixFetch

Function: createMixFetch()

createMixFetch(opts?): Promise<(url, init?) => Promise<Response>>

Convenience: set up the tunnel and return a fetch-bound function. Equivalent to await setupMixTunnel(opts); return mixFetch;. Safe to call multiple times; the underlying tunnel is a singleton.

Parameters

opts?: SetupMixTunnelOpts

Returns

Promise<(url, init?) => Promise<Response>>

Source

mix-fetch/src/index.ts:62 (opens in a new tab)