Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/hono/middleware/method-override/index.ts>methodOverride

Web Framework built on Web Standards
Very Popular
Go to Latest
variable methodOverride
import { methodOverride } from "https://deno.land/x/hono@v4.3.6/middleware/method-override/index.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