Skip to main content

Fetcher

Overview

Cloudflare Usage

Events are handled by defining and exporting an object with method handlers that correspond to event names:

export default {
fetch(request, env, context) {
return new Response('Hello')
},
}

In this setup, all incoming requests are classified as 'fetch' events. The fetch handler receives the Request and replies with a Response.

See

Usage

import { Fetcher } from 'keywork/router/interfaces'

Type parameters

NameType
BoundAliases{}

Implemented by

Debug Properties

displayName

optional displayName: `string`

A display name used for debugging and log messages.

Defined in

router/interfaces/Fetcher.ts:41

Other Properties

fetch

fetch: [`MiddlewareFetch<`BoundAliases`, `Promise<Response>`>`](MiddlewareFetch.mdx)

Defined in

router/interfaces/Fetcher.ts:43