title: Saving an image form clj-http request to file
body: <p>I am trying to save a file downloaded using <a href="https://github.com/dakrone/clj-http/">clj-http</a></p>
  
  <p>I have the following code:</p>
  
  <pre><code>(def test-file
    (cl/get "http://placehold.it/350x150"))
  
  (defn write-file []
     (with-open [w (clojure.java.io/writer  "test-file.gif" :append true)]
  (.write w (:body test-file))))
  </code></pre>
  
  <p>and when I try to make it as a byte-array, I get an exception:</p>
  
  <pre><code>       user=&gt;     (def test-file
                      (cl/get "http://placehold.it/350x150" {:as :byte-array}))
         #'user/test-file
         user=&gt; (write-file)
         IllegalArgumentException No matching method found: write for class java.io.BufferedWriter  clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:79)
  </code></pre>
  
  <p>Help!</p>