Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/http/internal.ts>listenFetchEvent

A JavaScript extension package for building strong and modern applications.
Latest
function listenFetchEvent
import { listenFetchEvent } from "https://deno.land/x/ayonli_jsext@v0.9.72/http/internal.ts";

Adds a event listener to the fetch event in service workers that handles HTTP requests with the given options.

Parameters

options: Pick<ServeOptions, "fetch" | "headers"> & { onError: RequestErrorHandler; ws: WebSocketServer; bindings?: RequestContext["bindings"]; }