Code example for AbstractHttpClient

Methods: getParams

0
        SchemeRegistry schemeRegistry = new SchemeRegistry();
        schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
        schemeRegistry.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));
        ClientConnectionManager cm = new ThreadSafeClientConnManager(params, schemeRegistry);
        httpClient = new DefaultHttpClient(cm, params);
        httpClient.getParams().setParameter(ClientPNames.HANDLE_REDIRECTS, false);
        HttpClientHelper.setAcceptAllCookies(httpClient);
        HttpClientHelper.addGzipCompression(httpClient);
    } 
 
    /** 
     * Login with credentials 
     * 
     * @param credentials 
     * @throws IOException 
     * @throws UserapiLoginException 
     */ 
    public void login(Credentials credentials) throws IOException, UserapiLoginException { 
        login = credentials.getLogin();
        pass = credentials.getPass();
        remix = credentials.getRemixpass();