user> (use '[clojure.contrib.http.agent :as ha]) WARNING: bytes already refers to: #'clojure.core/bytes in namespace: user, being replaced by: #'clojure.contrib.http.agent/bytes nil user> (string (http-agent "http://url.that.doesnt.exist.com"))
This will block indefinitely since the url does not exist. user> (def a (http-agent "http://url.that.doesnt.exist.com")) #'user/a user> (agent-error a) #<UnknownHostException java.net.UnknownHostException: url.that.doesnt.exist.com> user> (ha/done? a) false Is there a way to get http-agent to throw an exception on string? I've tried :connect-timeout, but to no avail since it blocks indefinitely. (string (http-agent "http://url.that.doesnt.exist.com" :connect- timeout 10)) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en