How to decrease the HttpClient url connectivity time to a server ?
I'm validating some api urls provided from a web service. I'm calling those urls for more than 4000 time with different parameters through HttpClient class. When i start my java program, it will takes 3 to 4 hours to complete the process. I need to reduce this time consumption.
Is there any way to reduce the time consumption or increase the url request connectivity speed ?
And also could you please explain me the root cause for this problem and how to solve this problem ?
PostMethod post = new PostMethod(targetURL);
HttpClient httpclient = new HttpClient();
MultiThreadedHttpConnectionManager cnmngr = new MultiThreadedHttpConnectionManager();
httpclient.getParams().setParameter("http.protocol .content-charset", "UTF-8");
int result = httpclient.executeMethod(post);
String postResp = post.getResponseBodyAsString();
Thanks in advance.
Re: How to decrease the HttpClient url connectivity time to a server ?