Settings

Theme

Add PUT, PATCH, and DELETE to form method attribute

github.com

4 points by jacobr 7 months ago · 2 comments

Reader

theandrewbailey 7 months ago

A while ago, I was looking at the delete comment buttons on my blog, and noticed the form's POST method, and realized that DELETE would be more semantically accurate. Then I learned that you can't have DELETE as a form method; you can only do that in ajax requests. A casual search about form method DELETE requests mentioned a lot of irrevelant (to me) issues and corner cases around cross origin requests, but almost nothing was said about the happy path of talking to the same server (what I would be doing).

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection