Skip to content

rodnaph/wrap-verbs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

Ring Middleware for HTTP Verbs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published