@nymproject/mix-fetch • Docs
@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>>