Skip to content

Instantly share code, notes, and snippets.

@hiredman
Created November 17, 2009 05:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiredman/236676 to your computer and use it in GitHub Desktop.
Save hiredman/236676 to your computer and use it in GitHub Desktop.
(defn post [url stuff]
(-> url URL. .openConnection
(doto (.setDoInput true)
(.setDoOutput true)
(-> con .getOutputStream OutputStreamWriter.
((juxt #(.write % stuff) #(.close %)))))
.getInputStream
((juxt clojure.xml/parse #(.close %)))
first))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment