• (buffer-bytes http-agnt)
The default HTTP agent result handler; it collects the response
body in a java.io.ByteArrayOutputStream, which can later be
retrieved with the 'stream', 'string', and 'bytes' functions.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/http/agent.clj:154 top

(defn buffer-bytes
  "The default HTTP agent result handler; it collects the response
  body in a java.io.ByteArrayOutputStream, which can later be
  retrieved with the 'stream', 'string', and 'bytes' functions."
  [http-agnt]
  (let [output (ByteArrayOutputStream.)]
    (duck/copy (or (stream http-agnt) "") output)
    output))
Vars in clojure.contrib.http.agent/buffer-bytes: defn let or
Used in 0 other vars

Comments top

No comments for buffer-bytes. Log in to add a comment.