              proxy
              realm
              request-timeout
-             user-agent]}]
+             user-agent
+             async-connect]}]
   (AsyncHttpClient.
    (.build
     (let [b (AsyncHttpClientConfig$Builder.)]

      (when connection-timeout (.setConnectionTimeoutInMs b connection-timeout))
      (when (not (nil? follow-redirects)) (.setFollowRedirects b follow-redirects))
      (when idle-in-pool-timeout (.setConnectionTimeoutInMs b idle-in-pool-timeout))
      (when (not (nil? keep-alive)) (.setKeepAlive b keep-alive))
      (when max-conns-per-host (.setMaximumConnectionsPerHost b max-conns-per-host))
      (when max-conns-total (.setMaximumConnectionsTotal b max-conns-total))
      (when max-redirects (.setMaximumNumberOfRedirects b max-redirects))
      (set-proxy proxy b)
      (when realm
        (set-realm realm b))

  (:use [http.async.client request headers util]
        clojure.template)
  (:import (java.io ByteArrayOutputStream)
           (com.ning.http.client AsyncHttpClient AsyncHttpClientConfig$Builder)
           (com.ning.http.client.providers.netty NettyAsyncHttpProviderConfig)))

(defn create-client
  "Creates new Async Http Client.
