            retry-handler response-interceptor] :as req}]
   (let [conn-mgr (or conn/*connection-manager*
                      (conn/make-regular-conn-manager req))
-        http-client (DefaultHttpClient. ^ClientConnectionManager conn-mgr)
+        http-client (with-routing (DefaultHttpClient. ^ClientConnectionManager conn-mgr))
         scheme (name scheme)]
     (when-let [cookie-store (or cookie-store *cookie-store*)]
       (.setCookieStore http-client cookie-store))


(def ^{:dynamic true} *cookie-store* nil)

(defn- default-proxy-host-for
  [scheme]
  (System/getProperty (str scheme ".proxyHost")))

(defn- default-proxy-port-for
  [scheme]
  (Integer/parseInt (System/getProperty (str scheme ".proxyPort"))))

(defn add-client-params!
  "Add various client params to the http-client object, if needed."
  [http-client scheme socket-timeout conn-timeout server-name
   proxy-host proxy-port]
  (doto http-client
    (set-client-param ClientPNames/COOKIE_POLICY
                      CookiePolicy/BROWSER_COMPATIBILITY)

    (set-client-param "http.socket.timeout"
                      (and socket-timeout (Integer. ^Long socket-timeout)))
    (set-client-param "http.connection.timeout"
                      (and conn-timeout (Integer. ^Long conn-timeout)))))

(defn- coerce-body-entity
  "Coerce the http-entity from an HttpResponse to either a byte-array, or a
