Created
March 5, 2014 23:50
-
-
Save rplevy/9379232 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
;; 1. in checkouts dir, ln -s ../../clj-http . | |
;; 2. stick in clj-http.core/request: | |
(println | |
(str "curl -X" (.toUpperCase (name request-method)) " '" | |
(name scheme) "://" server-name ":" server-port uri | |
(or query-string "") | |
"' " | |
(reduce-kv (ƒ [r k v] | |
(str r " -H '" k ": " v "'")) "" headers) | |
(if body (str " -d '" (slurp (.getContent body)) "'") ""))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment