Results 1 to 2 of 2
- 08-16-2012, 01:06 PM #1Member
- Join Date
- Aug 2012
- Rep Power
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.
- 08-16-2012, 03:51 PM #2
Re: How to decrease the HttpClient url connectivity time to a server ?If you're forever cleaning cobwebs, it's time to get rid of the spiders.
- By Repsajo in forum New To JavaReplies: 0Last Post: 03-18-2011, 09:48 PM
- By gurpreet.singh in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 03-17-2011, 12:26 PM
- By sunny23m in forum Advanced JavaReplies: 3Last Post: 09-18-2010, 07:06 PM
- By praveen_1987 in forum Enterprise JavaBeans (EJB)Replies: 3Last Post: 05-21-2010, 08:33 AM
- By newtojava7 in forum New To JavaReplies: 2Last Post: 01-28-2008, 08:22 AM