Module

x/drash/src/modules/chains/RequestChain/mod.polyfill.ts>Middleware

A microframework for building JavaScript HTTP applications. Runtime-agnostic. Strongly typed.
Latest
class Middleware
extends Resource
import { Middleware } from "https://dotland.deno.dev/x/drash@v3.0.0-beta.2/src/modules/chains/RequestChain/mod.polyfill.ts";

Properties

optional
original: Resource

Methods

ALL(input: unknown)

Use this method to intercept the request before it is passed to the resource's HTTP method. With this method, you can short-circuit the request, modify the request, send the request to the resource based on conditions, etc.

To send the request to the resource (or next middleware), call this.next<ReturnType>(input). See example for more details.

CONNECT(input: unknown): unknown
DELETE(input: unknown): unknown
GET(input: unknown): unknown
HEAD(input: unknown): unknown
next<ReturnValue>(input: unknown): ReturnValue
OPTIONS(input: unknown): unknown
PATCH(input: unknown): unknown
POST(input: unknown): unknown
PUT(input: unknown): unknown
TRACE(input: unknown): unknown