Example usage for org.apache.commons.httpclient.methods OptionsMethod getParams

List of usage examples for org.apache.commons.httpclient.methods OptionsMethod getParams

Introduction

In this page you can find the example usage for org.apache.commons.httpclient.methods OptionsMethod getParams.

Prototype

@Override
public HttpMethodParams getParams() 

Source Link

Document

Returns HttpMethodParams HTTP protocol parameters associated with this method.

Usage

From source file:org.infoscoop.request.ProxyRequest.java

public int executeOptions() throws Exception {
    OptionsMethod method = null;
    try {//  www . ja  v a2  s . c  o m
        HttpClient client = this.newHttpClient();
        method = new OptionsMethod(this.getTargetURL());
        method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER,
                new DefaultHttpMethodRetryHandler(1, false));
        ProxyFilterContainer filterContainer = (ProxyFilterContainer) SpringUtil.getBean(filterType);
        return filterContainer.invoke(client, method, this);
    } catch (ProxyAuthenticationException e) {
        if (e.isTraceOn()) {
            log.error(this.getTargetURL());
            log.error("", e);
        } else {
            log.warn(this.getTargetURL() + " : " + e.getMessage());
        }
        return 401;
    }
}