method IServiceBinding.fetch
IServiceBinding.fetch(
input: Request | string,
): Promise<Response>

Invokes the bound Worker.

Parameters

input: Request | string

The request, as fetch accepts it

optional
init: RequestInit

Request initialization

Return Type

Promise<Response>

The bound Worker's response

Usage

import { type IServiceBinding } from "cloudflare-plugin/src/index.ts";