Example usage for org.apache.commons.httpclient.params HttpMethodParams isParameterTrue

List of usage examples for org.apache.commons.httpclient.params HttpMethodParams isParameterTrue

Introduction

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

Prototype

public boolean isParameterTrue(String paramString) 

Source Link

Usage

From source file:org.apache.maven.wagon.providers.webdav.AbstractHttpClientWagonTest.java

public void testSetPreemptiveAuthParamViaConfig() {
    HttpMethodConfiguration methodConfig = new HttpMethodConfiguration();
    methodConfig.addParam(HttpClientParams.PREEMPTIVE_AUTHENTICATION, "%b,true");

    HttpConfiguration config = new HttpConfiguration();
    config.setAll(methodConfig);//from   w w  w  .  j a  v  a2  s.  c  om

    TestWagon wagon = new TestWagon();
    wagon.setHttpConfiguration(config);

    HeadMethod method = new HeadMethod();
    wagon.setParameters(method);

    HttpMethodParams params = method.getParams();
    assertNotNull(params);
    assertTrue(params.isParameterTrue(HttpClientParams.PREEMPTIVE_AUTHENTICATION));
}