Permalink
Browse files

Closing client.

  • Loading branch information...
neotyk committed Sep 26, 2010
1 parent 8011134 commit fa67835564ba4d476e29f217e9ff35f077a33e22
Showing with 14 additions and 1 deletion.
  1. +9 −1 changelog.org
  2. +5 −0 src/http/async/client.clj
View
@@ -16,14 +16,22 @@
Proxy can be specified per request. [[http://neotyk.github.com/http.async.client/http://neotyk.github.com/http.async.client/docs.html#sec-1.2.3.5][Documentation]].
** Branding User-Agent
Specifying User-Agent per client.
- [[http://neotyk.github.com/http.async.client/autodoc/http.async.client-api.html#http.async.client/create-client][*http.async.client/create-client*]] and [[http://neotyk.github.com/http.async.client/autodoc/http.async.client-api.html#http.async.client/with-ahc][*http.async.client/with-ahc*]].
+ [[http://neotyk.github.com/http.async.client/autodoc/http.async.client-api.html#http.async.client/create-client][*http.async.client/create-client*]] and [[http://neotyk.github.com/http.async.client/autodoc/http.async.client-api.html#http.async.client/with-client][*http.async.client/with-client*]].
** Keyworded maps in API
Like *:options* in [[http://neotyk.github.com/http.async.client/autodoc/http.async.client-api.html#http.async.client/GET][*http.async.client/GET*]].
* Release 0.2.1
+** Terminate body seq if errored :bug:
** Canceling request
*http.async.client/cancel* and *http.async.client/canceled?*
** Request timeout
Per request configuration of request timeout in ms.
#+BEGIN_SRC clojure
(GET url :timeout 100)
#+END_SRC
+** Close client
+ *http.async.client/close*.
+ #+BEGIN_SRC clojure
+ (c/close)
+ ;; or
+ (c/close hac)
+ #+END_SRC
@@ -149,3 +149,8 @@
[resp]
(when-let [f (:cancel (meta resp))]
(f)))
+
+(defn close
+ "Closes client."
+ ([] (close *client*))
+ ([client] (.close client)))

0 comments on commit fa67835

Please sign in to comment.