title: How to execute the "less popular" HTTP actions in a RESTful web app?
body: <p>I'm developing a Python web app as a learning exercise, and I am looking into making my app RESTful.</p>
  
  <p>To that end, I want to be able to handle various types of HTTP actions/verbs where they are applicable.  For example, if widget with id 12 is represented with the URI <a href="http://domain/widget/12" rel="nofollow noreferrer">http://domain/widget/12</a>, and I want to give the end user the ability to delete this widget, they should be able to make an HTTP DELETE request against /widget/12.</p>
  
  <p>However, HTML forms only support GET and POST as far as I know, so how would I go about making an HTTP request with the "less popular" HTTP actions, such as DELETE?</p>
  
  <p>Let's say that on the widget 12's view page (returned by HTTP GET), I want to include a form with just a single submit button to delete that widget.  For example:</p>
  
  <pre><code>&lt;form action="/widget/12" method="DELETE"&gt;
  &lt;input type="submit" value="Delete Me!" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>However, it's already established that HTML forms do not support DELETE for the method attribute.  So what is the RESTful way of executing a DELETE request from the client in this situation?</p>