From 712cafd1e9082746862fe4cd264996c94465af8d Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Fri, 28 Dec 2012 14:59:41 +0000 Subject: [PATCH] Added method to create minimal HttpClient with a custom connection manager git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1426535 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/http/impl/client/HttpClients.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/httpclient/src/main/java/org/apache/http/impl/client/HttpClients.java b/httpclient/src/main/java/org/apache/http/impl/client/HttpClients.java index d61c4d7ca..c51bb194c 100644 --- a/httpclient/src/main/java/org/apache/http/impl/client/HttpClients.java +++ b/httpclient/src/main/java/org/apache/http/impl/client/HttpClients.java @@ -28,6 +28,7 @@ package org.apache.http.impl.client; import org.apache.http.annotation.Immutable; +import org.apache.http.conn.HttpClientConnectionManager; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; /** @@ -56,4 +57,8 @@ public class HttpClients { return new MinimalHttpClient(new PoolingHttpClientConnectionManager()); } + public static CloseableHttpClient createMinimal(final HttpClientConnectionManager connManager) { + return new MinimalHttpClient(connManager); + } + }