malcolmsparks/compojure-rest — pull request #3 by james-henderson (2012-07-09 19:07:22+00:00)
Title: with-context-map

Hi Malcolm,

A little change that saves us the bother of 'wrap-binder', adding a parameter to the request and fishing it out again:

(defresource hello-resource
:handle-ok (fn [{name ::name :as context}] (str "Hello," name)))

(routes
(ANY "/hello/:name" [name]
(with-context hello-resource ::name name))
(ANY "/hello2/:name" [name]
(with-context-map hello-resource {::name name})))

Have also updated the README with our changes to create!/update!/put!/post! etc

James