Example usage for org.apache.commons.httpclient.params HostParams HostParams

List of usage examples for org.apache.commons.httpclient.params HostParams HostParams

Introduction

In this page you can find the example usage for org.apache.commons.httpclient.params HostParams HostParams.

Prototype

public HostParams() 

Source Link

Usage

From source file:smartrics.rest.fitnesse.fixture.support.HttpClientBuilder.java

private void configureHost(final Config config, HttpClient client) {
    HostConfiguration hostConfiguration = client.getHostConfiguration();
    String proxyHost = config.get("http.proxy.host");
    if (proxyHost != null) {
        int proxyPort = config.getAsInteger("http.proxy.port", DEFAULT_PROXY_PORT);
        hostConfiguration.setProxy(proxyHost, proxyPort);
    }//from w w  w.  j a v  a2  s .  c o  m
    HostParams hostParams = new HostParams();
    hostConfiguration.setParams(hostParams);
}