Created
December 24, 2011 17:54
-
-
Save anonymous/1517935 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
(defn download | |
[file-name url] | |
(h/http-agent url | |
:handler (fn [agnt] | |
(with-open [w (ds/writer file-name)] | |
(ds/copy (h/stream agnt) w))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment