Code example for AbstractHttpClient

Methods: getConnectionManager

    public static void setPortForScheme(String scheme, int port) {
        Scheme _scheme = new Scheme(scheme, PlainSocketFactory.getSocketFactory(), port);
    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)) {
Connect your IDE to all the code out there  Get Codota for Java