aboutsummaryrefslogtreecommitdiff
path: root/src/clojure/contrib
diff options
context:
space:
mode:
authorStuart Sierra <mail@stuartsierra.com>2009-08-17 16:52:03 -0400
committerStuart Sierra <mail@stuartsierra.com>2009-08-17 16:52:03 -0400
commit78637658d879f8859ac6a883e0e0984d63f6ff18 (patch)
tree1de3bd388f2683c7dcc510c15da1b8bd7b40ddec /src/clojure/contrib
parentb5fa8307d410a4447e6c36ac5fcaeff0c4f1baff (diff)
http/agent.clj: more documentation, refs #15
Diffstat (limited to 'src/clojure/contrib')
-rw-r--r--src/clojure/contrib/http/agent.clj9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/clojure/contrib/http/agent.clj b/src/clojure/contrib/http/agent.clj
index 4fe30963..fe34c98c 100644
--- a/src/clojure/contrib/http/agent.clj
+++ b/src/clojure/contrib/http/agent.clj
@@ -50,13 +50,14 @@
(http-agent \"http...\" :method \"POST\" :body \"foo=1\")
- And you could write the response directly to a file like this (requires
- clojure.contrib.duck-streams/copy):
+ And you could write the response directly to a file like this:
+
+ (require '[clojure.contrib.duck-streams :as d])
(http-agent \"http...\"
:handler (fn [agnt]
- (with-open [w (writer \"/tmp/out\")]
- (copy (stream agnt) w))))
+ (with-open [w (d/writer \"/tmp/out\")]
+ (d/copy (stream agnt) w))))
"}
clojure.contrib.http.agent