Example usage for org.apache.commons.httpclient Cookie isSecure

List of usage examples for org.apache.commons.httpclient Cookie isSecure

Introduction

In this page you can find the example usage for org.apache.commons.httpclient Cookie isSecure.

Prototype

boolean isSecure

To view the source code for org.apache.commons.httpclient Cookie isSecure.

Click Source Link

Usage

From source file:com.lazerycode.ebselen.customhandlers.FileDownloader.java

/**
 * Load in all the cookies WebDriver currently knows about so that we can mimic the browser cookie state
 *
 * @param seleniumCookieSet//w w w  . ja v a 2 s.com
 * @return
 */
private HttpState mimicCookieState(Set<org.openqa.selenium.Cookie> seleniumCookieSet) {
    HttpState mimicWebDriverCookieState = new HttpState();
    for (org.openqa.selenium.Cookie seleniumCookie : seleniumCookieSet) {
        Cookie httpClientCookie = new Cookie(seleniumCookie.getDomain(), seleniumCookie.getName(),
                seleniumCookie.getValue(), seleniumCookie.getPath(), seleniumCookie.getExpiry(),
                seleniumCookie.isSecure());
        mimicWebDriverCookieState.addCookie(httpClientCookie);
    }
    return mimicWebDriverCookieState;
}

From source file:jhc.redsniff.webdriver.download.FileDownloader.java

private HttpState mimicCookieState(Set<org.openqa.selenium.Cookie> seleniumCookieSet) {
    HttpState mimicWebDriverCookieState = new HttpState();
    for (org.openqa.selenium.Cookie seleniumCookie : seleniumCookieSet) {
        Cookie httpClientCookie = new Cookie(seleniumCookie.getDomain(), seleniumCookie.getName(),
                seleniumCookie.getValue(), seleniumCookie.getPath(), seleniumCookie.getExpiry(),
                seleniumCookie.isSecure());
        mimicWebDriverCookieState.addCookie(httpClientCookie);
    }/*from   w  w  w . ja  va2 s. c om*/
    return mimicWebDriverCookieState;
}