createProxiedFetch()
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / createProxiedFetch
Function: createProxiedFetch()
Section titled “Function: createProxiedFetch()”createProxiedFetch(
agent):ProxiedFetch
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:16963
Create a fetch function that uses a proxy agent
Parameters
Section titled “Parameters”Proxy agent (from createProxyAgent)
Agent | undefined
Returns
Section titled “Returns”Fetch function with proxy support
Example
Section titled “Example”const agent = await createProxyAgent('tor')const proxiedFetch = createProxiedFetch(agent)
// All requests go through Torconst response = await proxiedFetch('https://api.example.com/data')