Module

x/hono/middleware.ts>methodOverride

Web Framework built on Web Standards
Extremely Popular
Go to Latest
variable methodOverride
import { methodOverride } from "https://dotland.deno.dev/x/hono@v4.3.2/middleware.ts";

Method Override Middleware

Examples

// with form input method const app = new Hono() app.use('/books/', methodOverride({ app })) // the default form value is _method app.use('/authors/', methodOverride({ app, form: 'method' }))

// with custom header app.use('/books/*', methodOverride({ app, header: 'X-HTTP-METHOD-OVERRIDE' }))

// with query parameter app.use('/books/*', methodOverride({ app, query: '_method' }))

type

(options: MethodOverrideOptions) => MiddlewareHandler