Class HC3CookieHandler
java.lang.Object
org.apache.jmeter.protocol.http.control.HC3CookieHandler
- All Implemented Interfaces:
CookieHandler
HTTPClient 3.1 implementation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCookieFromHeader
(CookieManager cookieManager, boolean checkCookies, String cookieHeader, URL url) Add cookie to CookieManager from cookieHeader and URLgetCookieHeaderForURL
(CollectionProperty cookiesCP, URL url, boolean allowVariableCookie) Find cookies applicable to the given URL and build the Cookie header from them.
-
Constructor Details
-
HC3CookieHandler
- Parameters:
policy
- cookie policy to which to conform (seeCookiePolicy#getCookieSpec(String)
-
-
Method Details
-
getCookieHeaderForURL
public String getCookieHeaderForURL(CollectionProperty cookiesCP, URL url, boolean allowVariableCookie) Find cookies applicable to the given URL and build the Cookie header from them.- Specified by:
getCookieHeaderForURL
in interfaceCookieHandler
- Parameters:
url
- URL of the request to which the returned header will be added.cookiesCP
-CollectionProperty
ofCookie
allowVariableCookie
- flag whether to allow jmeter variables in cookie values- Returns:
- the value string for the cookie header (goes after "Cookie: ").
-
addCookieFromHeader
public void addCookieFromHeader(CookieManager cookieManager, boolean checkCookies, String cookieHeader, URL url) Add cookie to CookieManager from cookieHeader and URL- Specified by:
addCookieFromHeader
in interfaceCookieHandler
- Parameters:
cookieManager
- CookieManager on which cookies are addedcheckCookies
- boolean to indicate if cookies must be validated against speccookieHeader
- String cookie Headerurl
- URL
-