/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-for-example-820f78d94d20-for-example-s0179-c0000.md
For example - hono-docs
For example Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt for example Summary Since HTML forms...
For example
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#for-example
Summary
Since HTML forms cannot send a DELETE method, you can put the value DELETE in the property named _method and send it. And the handler for app.delete() will be executed. The HTML form: html The application: ```ts import { met...
Content
Since HTML forms cannot send a DELETE method, you can put the value DELETE in the property named _method and send it. And the handler for app.delete() will be executed.
The HTML form:
<form action="/posts" method="POST">
<input type="hidden" name="_method" value="DELETE" />
<input type="text" name="id" />
</form>The application:
import { methodOverride } from 'hono/method-override'
const app = new Hono()
app.use('/posts', methodOverride({ app }))
app.delete('/posts', () => {
// ...
})You can change the default values or use the header value and query value:
app.use('/posts', methodOverride({ app, form: '_custom_name' }))
app.use(
'/posts',
methodOverride({ app, header: 'X-METHOD-OVERRIDE' })
)
app.use('/posts', methodOverride({ app, query: '_method' }))