Re: problem with stream

2011-01-06 Thread Hubert Iwaniuk
Shameless plug: or use http.async.client http://neotyk.github.com/http.async.client/docs.html#sec-1_2_4_1 (let [resp (c/stream-seq :get url)] (doseq [s (string resp)] (println s))) Cheers, Hubert. On Thu, Jan 6, 2011 at 5:34 PM, Aaron Cohen wrote: > On Wed, Jan 5, 2011 at 5:13 PM, Ken We

Re: problem with stream

2011-01-06 Thread Aaron Cohen
On Wed, Jan 5, 2011 at 5:13 PM, Ken Wesson wrote: > On Wed, Jan 5, 2011 at 4:40 PM, rainerh wrote: >> Hello everybody, >> >> I'm trying to use clojure to parse web sites. Unfortunately there is >> some problem with following code (used library is Apache Commons HTTP >> Client): >> >> (defn reques

Re: problem with stream

2011-01-05 Thread Ken Wesson
On Wed, Jan 5, 2011 at 4:40 PM, rainerh wrote: > Hello everybody, > > I'm trying to use clojure to parse web sites. Unfortunately there is > some problem with following code (used library is Apache Commons HTTP > Client): > > (defn request [url] >  (let [client (new org.apache.http.impl.client.Def

problem with stream

2011-01-05 Thread rainerh
Hello everybody, I'm trying to use clojure to parse web sites. Unfortunately there is some problem with following code (used library is Apache Commons HTTP Client): (defn request [url] (let [client (new org.apache.http.impl.client.DefaultHttpClient)] (with-open [rdr (reader