Class CookieConverter
- java.lang.Object
-
- com.digitalpebble.stormcrawler.util.CookieConverter
-
public class CookieConverter extends Object
Helper to extract cookies from cookies string.
-
-
Constructor Summary
Constructors Constructor Description CookieConverter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
checkDomainMatchToUrl(String cookieDomain, String urlHostName)
Helper method to check if url matches a cookie domain.static List<org.apache.http.cookie.Cookie>
getCookies(String[] cookiesStrings, URL targetURL)
Get a list of cookies based on the cookies string taken from response header and the target url.
-
-
-
Method Detail
-
getCookies
public static List<org.apache.http.cookie.Cookie> getCookies(String[] cookiesStrings, URL targetURL)
Get a list of cookies based on the cookies string taken from response header and the target url.- Parameters:
cookiesStrings
- the value(s) of the http header for "Cookie" in the http response.targetURL
- the url for which we wish to pass the cookies in the request.- Returns:
- List off cookies to add to the request.
-
-