Skip to content

Instantly share code, notes, and snippets.

@lynndylanhurley
Created March 1, 2012 22:27
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 lynndylanhurley/1953683 to your computer and use it in GitHub Desktop.
Save lynndylanhurley/1953683 to your computer and use it in GitHub Desktop.
(defn retrieve-json
"asynchronously retrieve json content"
[url]
(async
(->
(http-request {:method :get
:url url})
(:body)
(receive (fn [ret]
(->
ret
bytes->string
println))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment