Code example for AbstractHttpClient

Methods: getConnectionManager

0
                ConnectivityManager.CONNECTIVITY_ACTION));
    } 
 
    public static void setPortForScheme(String scheme, int port) {
        Scheme _scheme = new Scheme(scheme, PlainSocketFactory.getSocketFactory(), port);
        httpClient.getConnectionManager().getSchemeRegistry().register(_scheme);
    } 
 
    public static void setUserAgent(String userAgent) {
        BetterHttp.httpUserAgent = userAgent;
        HttpProtocolParams.setUserAgent(httpClient.getParams(), userAgent);
    } 
 
    /** 
     * Simple {@link org.apache.http.HttpRequestInterceptor} that adds GZIP accept encoding header. 
     */ 
    static class GZIPHttpRequestInterceptor implements HttpRequestInterceptor {
        public void process(final HttpRequest request, final HttpContext context) {
            // Add header to accept gzip content 
            if (!request.containsHeader(HEADER_ACCEPT_ENCODING)) {
                request.addHeader(HEADER_ACCEPT_ENCODING, ENCODING_GZIP);