Created
August 3, 2011 04:59
-
-
Save jackowayed/1121943 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; added this to server.clj | |
(defn add-body [handler] | |
(fn [req] | |
(let [neue | |
(update-in req [:params] assoc :req-body (slurp (:body req)))] | |
(handler neue)))) | |
(server/add-middleware add-body) | |
;;; added this to my view file | |
(defpage [:any "/foo"] {:as params} | |
(str (= (:req-body params) ""))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment