Example usage for org.apache.commons.httpclient HostConfiguration setParams

List of usage examples for org.apache.commons.httpclient HostConfiguration setParams

Introduction

In this page you can find the example usage for org.apache.commons.httpclient HostConfiguration setParams.

Prototype

public void setParams(HostParams paramHostParams) 

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  ava  2s. co m*/
    HostParams hostParams = new HostParams();
    hostConfiguration.setParams(hostParams);
}