Code example for HttpClient

Methods: getParams

0
    configureHttpClient(client);
    return client;
  } 
 
  private static void configureHttpClient(HttpClient httpClient) {
    HttpParams params = httpClient.getParams();
    HttpConnectionParams.setStaleCheckingEnabled(params, false);
    HttpConnectionParams.setConnectionTimeout(params, DEFAULT_CONNECT_TIMEOUT_MILLIS);
    HttpConnectionParams.setSoTimeout(params, DEFAULT_READ_TIMEOUT_MILLIS);
    HttpConnectionParams.setSocketBufferSize(params, 8192);
    ConnManagerParams.setTimeout(params, DEFAULT_GET_CONNECTION_FROM_POOL_TIMEOUT_MILLIS);
 
    // Don't handle redirects automatically 
    HttpClientParams.setRedirecting(params, false);
 
    // Don't handle authentication automatically 
    HttpClientParams.setAuthenticating(params, false);
  } 
 
  private static HttpClient createHttpClientForFroyoAndHigher(Context context)
      throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException,