org.clojure / clojure -contrib "1.2.0" ring "1.1.8" compojure "1.1.5" clout "1.1.0"
(defroutes rest-routes (GET "/" [] "<p> Hello </p>") (POST "/api/v1/:stor/sync" [stor] (start-sync stor)) (POST ["/api/v1/:stor/:txn/data/:file" :file #".*"] [stor txn file] (txn-add stor txn file)) (ANY "*" [] "<p>Page not found. </p>"))
In the second POST, I also want to pass all the http headers to the txn-add handler. I did a lot of google and looked at the code but did not find anything useful.
I know, I can use the following to pass the headers (but then it does not parse the url request)
(POST "/api/v1" {headers :headers} (txn-add "dummy stor" "dummy txn" headers))
Also, how do I pass the content (that is: body) of the POST request to "txn-add"?
source share