Can I use the PUT method in an html form?

0

So far, everything is fine with GET or POST with an HTML form, but can PUT, PATCH, UPDATE be used to use them as a method when sending the form?

    
asked by Frank Leal 25.05.2018 в 18:06
source

1 answer

3

According to this other answer in StackOverflow , this is not possible since only GET and POST are the methods allowed by the Definition of the W3 :

  

The method and formmethod content attributes are enumerated attributes   with the following keywords and states:

     
  • The keyword get, mapping to the state GET, indicating the HTTP GET   method
  •   
  • The keyword post, mapping to the state POST, indicating the   HTTP POST method.
  •   
  • The keyword dialog, mapping to the state dialog,   indicating that submitting the form is intended to close the dialog   box in which the form finds itself, if any, and otherwise not submit.
  •   

A third is mentioned, "dialog", but it is not commonly used. According to the Mozilla Usage Notes its functionality if implemented:

  

form elements can be integrated within a dialog by specifying them with the attribute method="dialog". When such a form is submitted, the dialog is closed with a returnValue attribute set to the value of the submit button used.

    
answered by 25.05.2018 / 18:13
source