I want to update the httpclient version in my project. The project used http 3.1 jar, now I need to update version 4.0. I downloaded the repository from here
I changed most of the code, but got stuck on some api and method.I searched a lot, but could not find the equivalent of this, I describe below:
What is eqVivalent MultiThreadedHttpConnectionManager?
I found PoolingClientConnectionManager for httpClient 4.x, but it does not exist in version 4.0. here is my old code base for httpversion 3.1
MultiThreadedHttpConnectionManager connMgr = new MultiThreadedHttpConnectionManager(); m_client = new HttpClient(connMgr); m_client.getHttpConnectionManager() .getParams() .setMaxConnectionsPerHost( HostConfiguration.ANY_HOST_CONFIGURATION, maxConcurrentConnections); m_client.getHttpConnectionManager().getParams() .setConnectionTimeout(connectionTimeout); m_client.getParams().setSoTimeout(socketTimeout);
kailash gaur
source share