Example usage for org.apache.commons.httpclient HttpMethodBase setHostConfiguration

List of usage examples for org.apache.commons.httpclient HttpMethodBase setHostConfiguration

Introduction

In this page you can find the example usage for org.apache.commons.httpclient HttpMethodBase setHostConfiguration.

Prototype

@Deprecated
public void setHostConfiguration(final HostConfiguration hostconfig) 

Source Link

Document

Sets the HostConfiguration host configuration .

Usage

From source file:lucee.commons.net.http.httpclient3.HttpMethodCloner.java

private static void copyHttpMethodBase(HttpMethodBase m, HttpMethodBase copy) {
    if (m.getHostConfiguration() != null) {
        copy.setHostConfiguration(new HostConfiguration(m.getHostConfiguration()));
    }/*w  w  w .j a  v a2  s .  com*/
    try {
        copy.setParams((HttpMethodParams) m.getParams().clone());
    } catch (CloneNotSupportedException e) {
    }
}

From source file:smartrics.rest.fitnesse.fixture.support.http.URIBuilder.java

@SuppressWarnings("deprecation")
public void setURI(org.apache.commons.httpclient.HttpMethodBase m, URI uri) throws URIException {
    HostConfiguration conf = m.getHostConfiguration();
    if (uri.isAbsoluteURI()) {
        conf.setHost(new HttpHost(uri));
        m.setHostConfiguration(conf);
    }/*  ww w .  j av  a2 s .  co  m*/
    m.setPath(uri.getPath() != null ? uri.getEscapedPath() : "/");
    m.setQueryString(uri.getQuery());
}