Code example for HttpParams

Methods: setBooleanParameter

0
    static { 
        //sets up parameters  
        sParams = new BasicHttpParams(); 
        HttpProtocolParams.setVersion(sParams, HttpVersion.HTTP_1_1); 
        HttpProtocolParams.setContentCharset(sParams, "utf-8"); 
        sParams.setBooleanParameter("http.protocol.expect-continue", false); 
         
        //registers schemes for both http and https  
        SchemeRegistry registry = new SchemeRegistry(); 
        registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80)); 
        final SSLSocketFactory sslSocketFactory = SSLSocketFactory.getSocketFactory(); 
        sslSocketFactory.setHostnameVerifier(SSLSocketFactory.BROWSER_COMPATIBLE_HOSTNAME_VERIFIER); 
 
        registry.register(new Scheme("https", sslSocketFactory, 443)); 
        sManager = new ThreadSafeClientConnManager(sParams, registry); 
         
         
    } 
     
    static public String defaultProtocol() {
        return secureProtocol;