DEV Community

Method override for PUT and DELETE in HTML

Chan Ho Ahn on September 12, 2018

Following four HTTP methods are commonly used in REST. • GET - This is to provide a read-only access to resource. • PUT - This is to crea...
Collapse
 
othman profile image
Othmane Namani •

Hi @Chan, I really don't understand why using hidden input to render req.body._method = DELETE/PUT inside a form that really renders req.body._method = DELETE/PUT.
it is used separately in method-override documentation.
method-override documentation => github.com/expressjs/method-override

Collapse
 
wkolee profile image
william kolee •

This works perfectly :)

Collapse
 
sneezeaway profile image
Garyyyyyyy •

Awesome. Thanks for sharing!

Collapse
 
a01371852 profile image
Emmanuel Hernández Olvera •

Worked like magic. Thanks.

Collapse
 
vinicius77 profile image
Vinicius Cerqueira Bonifácio •

Thanks a lot for this post. It goes straight to the point, is concise and easy to understand.

Collapse
 
chan_austria777 profile image
chan 🤖 •

Is method_override still required up to this day?

Collapse
 
mritunjay4ever profile image
Mritunjay •

Thank you so much. Man I've literally cried.

Collapse
 
guerreroandresg profile image
guerreroandresg •

Is this still working? I'm having some issues doing it, I dont get any update with the put method

Collapse
 
sneezeaway profile image
Garyyyyyyy •

it's still working. Just tried this today.