HttpProtocolParams.setUserAgent(params, "TestAgent/1.1");
HttpProtocolParams.setUseExpectContinue(params, false);
HttpConnectionParams.setStaleCheckingEnabled(params, false);
ConnManagerParams.setMaxTotalConnections(params, 5);
ConnManagerParams.setMaxConnectionsPerRoute(params,
new ConnPerRouteBean(5));
SchemeRegistry supportedSchemes = new SchemeRegistry();
SocketFactory sf = PlainSocketFactory.getSocketFactory();
supportedSchemes.register(new Scheme("http", sf, 80));