HttpProtocolParams.setUserAgent(parameters,
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)");
HttpProtocolParams.setUseExpectContinue(parameters, false);
HttpConnectionParams.setTcpNoDelay(parameters, true);
SchemeRegistry schReg = new SchemeRegistry();
schReg.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
schReg.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));
ClientConnectionManager tsccm = new ThreadSafeClientConnManager(parameters, schReg);
DefaultHttpClient defaultHttpClient = new DefaultHttpClient(tsccm, parameters);
defaultHttpClient.addRequestInterceptor(new HttpRequestInterceptor() {
public void process(final HttpRequest request, final HttpContext context)