Skip to content

Instantly share code, notes, and snippets.

@jackowayed
Created August 3, 2011 04:59
Show Gist options
  • Save jackowayed/1121943 to your computer and use it in GitHub Desktop.
Save jackowayed/1121943 to your computer and use it in GitHub Desktop.
;;; 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