当我从Google Chrome提交此表单时,浏览器会发出GET请求。从HTML表单提交的具有多部分/表单数据编码的HTTP PUT请求通常是不受支持的客户端吗?
<form id="#main-form" action="http://localhost:8080/resource/1" method="put"
enctype="multipart/form-data">
<input type="text" name="name"/>
<input type="submit" value="submit" />
</form>
答案 0 :(得分:8)
HTML标记语言仅支持GET和POST请求,但您可以使用Ajax发出其他请求(PUT,DELETE等)。
已经回答了有关此事的问题: https://softwareengineering.stackexchange.com/questions/114156/why-there-are-no-put-and-delete-methods-in-html-forms
Why don't browsers support PUT and DELETE requests and when will they?