Skip to main content

Function: proxyFetchQueue()

proxyFetchQueue(doInstance, req, doBindingName, handler?, options?): Promise<string>

Defined in: src/proxyFetch.ts:129

Send a fetch request to be executed by a Worker via queue.

This is the Queue variant that uses Cloudflare Queues for message passing. For most use cases, prefer using the auto-detecting proxyFetch() function instead.

Parameters

doInstance

any

The Durable Object instance (pass this from within DO methods)

req

Request object or URL string to fetch

string | Request<unknown, CfProperties<unknown>>

doBindingName

string

Name of the DO binding for return routing

handler?

string

Optional name of the handler method on the DO to call with the response

options?

ProxyFetchOptions

Optional configuration for timeout, retries, etc.

Returns

Promise<string>

Promise that resolves with the request ID when the request is queued