3 ms·
> without a specific UI for it None of my browsers seem to have PUT, PATCH, and DELETE baked into the standard UI (or even POST really), so maybe it is true?
by stronglikedan 3y ago
> without a specific UI for it
None of my browsers seem to have PUT, PATCH, and DELETE baked into the standard UI (or even POST really), so maybe it is true?
- gweinberg 3y agoI just checked the MDN docs https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fo... The only allowed form methods are get, post, and dialog. So you can't do put, patch, or delete via a form.
- Turing_Machine 3y agoSure you can. You just can't specify it as a form action. There's nothing to stop you from using form elements to get your user inputs as normal, then wiring up your own "submit" button that calls your own Javascript to use any method you want. JS fetch, for example, lets you put anything you want in the method: field. I think you can even specify custom methods that only have meaning for your specific server-side code.