Skip to content

Use HTTP verbs such as DELETE or PUT in HTML forms

Notifications You must be signed in to change notification settings

vblinden/method-override

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

method_override

Let you use HTTP verbs such as DELETE or PUT in HTML forms.

Example

import { methodOverrideMiddleware } from 'https://deno.land/x/method_override/mod.ts'

export const handler = [
  methodOverrideMiddleware,

  // Other middleware...
];

You can now override the method in your HTML form.

<form action="" method="post">
  <input type="hidden" name="_method" value="DELETE">
</form>