Adapts an HttpEndpointHandler to the fetch signature used by Workers, Bun, Deno, Hono, Next and others.
const handler = toFetchHandler(client);app.post('/interactions', (c) => handler(c.req.raw)); // Honoexport default { fetch: (request, env, ctx) => handler(request, ctx) }; // Workers Copy
const handler = toFetchHandler(client);app.post('/interactions', (c) => handler(c.req.raw)); // Honoexport default { fetch: (request, env, ctx) => handler(request, ctx) }; // Workers
Adapts an HttpEndpointHandler to the fetch signature used by Workers, Bun, Deno, Hono, Next and others.