How do you download an image from the web and save it to your file system using Clojure? I know the image url and I'm aware that I can't use spit
and slurp
to do this because it's binary data, not text.
I'd like to do this as simply as possible, ideally like how spit and slurp work. That is, without a lot of extra lines using buffers or byte arrays. I want to close the streams when I'm done, but I don't care if it's inefficient.