Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Good thing.

Next, please convince browser vendors to support HTTP methods (PUT, DELETE, etc.) in forms.



You're probably aware of this, but for those that are not, you can easily get around this problem by adding a hidden form field with X-HTTP-Method-Override as the name and the method as the value. Assuming your web server supports the field.


Awesome, I don't know if I'll ever use it, but it's good to know.


If you want to build a RESTful website, it's really hard to get around it. Consider logging out. You want to send a DELETE to /Session. So you can just do this:

  <form action="/Session" method="post">
    <input name="X-HTTP-Method-Override" type="hidden" value="DELETE" />
    <input type="submit" value="Log off" />
  </form>




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: