5 ms·
You can't PUT or DELETE from a html <form>.
by wereHamster 13y ago
You can't PUT or DELETE from a html <form>.
- texuf 13y agoyou also can't PUT from an embedded flash app
- joshfraser 13y agoI knew there was a simple explanation that I was forgetting.
- est 13y agobecause some stupid waf only allow POST/GET methods on port 80.
- vaidik 13y agoAlthough this is a possible explanation, do you consume APIs using HTML forms? Probably not. And if you desperately have to consume APIs in the browser, you'd end up writing some JavaScript.
- deleted 13y ago[deleted]
- deleted 13y ago[deleted]
- deleted 13y ago[deleted]
- vaidik 13y agoAlthough this is a possible explanation, do you consume APIs using HTML forms? Probably not. And if you desperately have to consume APIs in the browser, you'd end up writing some JavaScript.
- aaronem 13y agoSure you can, although you need to do it via Ajax. The W3C FORM element is specified with only 'get' and 'post' as permissible values for 'method', which I can only regard as a screwup on W3C's part, but I know of no similar restriction on the methods available to an XMLHttpRequest object; indeed at least one extremely well-regarded Stack Overflow answer [1] confirms that PUT and DELETE work as expected as of five years ago. [1] http://stackoverflow.com/a/166501/1713079 http://stackoverflow.com/a/166501/1713079