Skip to main content
Module

x/http_fns/types.ts>RequestInterceptor

A bunch of functions for building HTTP servers
Go to Latest
type alias RequestInterceptor
import { type RequestInterceptor } from "https://deno.land/x/http_fns@v0.0.27/types.ts";

A RequestInterceptor function takes a Request and optionally returns a modified or new Request.

May return no value (void) or undefined to indicate no change to the Request.

May also return (or throw) a Response to skip further RequestInterceptors and the handler entirely, the response will still be passed through further ResponseInterceptors.

Type Parameters

optional
A extends unknown[] = unknown[]
definition: (req: Request, ...args: A) => Awaitable<Request | Response | void>