Module

x/oak/router.ts>Router#patch

A middleware framework for handling HTTP with Deno, Node, Bun and Cloudflare Workers 🐿️ 🦕
Very Popular
Latest
method Router.prototype.patch
import { Router } from "https://dotland.deno.dev/x/oak@v17.1.2/router.ts";

Register named middleware for the specified routes when the PATCH, method is requested.

Type Parameters

R extends string
optional
P extends RouteParams<R> = RouteParams<R>
optional
S extends State = RS

Parameters

name: string
path: R
middleware: RouterMiddleware<R, P, S>
...middlewares: RouterMiddleware<R, P, S>[]

Returns

Router<S extends RS ? S : (S & RS)>

Register middleware for the specified routes when the PATCH, method is requested.

Type Parameters

R extends string
optional
P extends RouteParams<R> = RouteParams<R>
optional
S extends State = RS

Parameters

path: R
middleware: RouterMiddleware<R, P, S>
...middlewares: RouterMiddleware<R, P, S>[]

Returns

Router<S extends RS ? S : (S & RS)>

Register middleware for the specified routes when the PATCH, method is requested with explicit path parameters.

Type Parameters

P extends RouteParams<string>
optional
S extends State = RS

Parameters

nameOrPath: string
pathOrMiddleware: string | RouterMiddleware<string, P, S>
...middleware: RouterMiddleware<string, P, S>[]

Returns

Router<S extends RS ? S : (S & RS)>