Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 652 Bytes

README.md

File metadata and controls

30 lines (21 loc) · 652 Bytes

wrap-verbs

Ring middleware to convert the _method parameter to the HTTP verb for the request. Allows HTML forms to send all HTTP request methods.

Usage

Available from Clojars

(ns my.namespace
  (:use [ring.middleware.verbs :only [wrap-verbs]]))

(def app
  (-> #'app-routes
    (wrap-verbs)
    (handler/site)))

Which allows the following HTML form to send a DELETE request.

<form method="post" action="/some/action">
  <input type="hidden" name="_method" value="delete" />
  <input type="submit" value="Delete Something" />
</form>