Skip to content

Instantly share code, notes, and snippets.

@rplevy
Created March 5, 2014 23:50
Show Gist options
  • Save rplevy/9379232 to your computer and use it in GitHub Desktop.
Save rplevy/9379232 to your computer and use it in GitHub Desktop.
;; 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