 
 (defn pooling-conn-mgr []
   (PoolingHttpClientConnectionManager. (registry-builder)))
+
+(defn basic-conn-mgr []
+  (BasicHttpClientConnectionManager. (registry-builder)))
+
+(defn reusable? [^HttpClientConnectionManager conn-mgr]
+  (instance? PoolingHttpClientConnectionManager conn-mgr))
 
 (defn http-client [conn-mgr]
   (-> (HttpClients/custom)

           (org.apache.http.entity ByteArrayEntity StringEntity)
           (org.apache.http.impl.client BasicCredentialsProvider
                                        CloseableHttpClient HttpClients)
           (org.apache.http.impl.conn PoolingHttpClientConnectionManager)))

(defn http-route []
  ;; TODO add proxy support

  (:import (java.io FilterInputStream InputStream)
           (java.net URI)
           (java.util Locale)
           (org.apache.http HttpEntity HeaderIterator HttpHost HttpRequest
                            HttpEntityEnclosingRequest HttpResponse)
           (org.apache.http.client.methods HttpDelete HttpGet HttpPost HttpPut
                                           HttpOptions HttpPatch
                                           HttpHead
                                           HttpEntityEnclosingRequestBase)
           (org.apache.http.client.protocol HttpClientContext)
           (org.apache.http.config RegistryBuilder)
           (org.apache.http.conn HttpClientConnectionManager)
