Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/dectyl/mod.ts>DeployWorker#fetch

Prototype library for testing Deno Deploy scripts using the Deno CLI
Go to Latest
method DeployWorker.prototype.fetch
import { DeployWorker } from "https://deno.land/x/dectyl@0.6.2/mod.ts";

Send a request into the program and resolve with the resulting Response and additional information about the request.

For example:

const helloWorld = await createWorker("./hello_world.ts");
await helloWorld.run(async () => {
  const [response, info] = await helloWorld.fetch("/");
  // make assertions against the response
});

Parameters

input: string | Request | URL
optional
requestInit: RequestInit

Returns

Promise<[Response, RequestResponseInfo]>