i do multiple request to the same url using httpclient.execute(request). Can I re-use the connection for the consecutive requests? how can i optimise the code without declaring HttpClient again and again.
for(int i=0;i<=50;i++)
{
HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("my_url");
HttpResponse response = client.execute(request);
System.out.println(response.getStatusLine().getStatusCode());
}