public final class JavaNetCookieJar extends Object implements CookieJar
CookieHandler.NO_COOKIES| Constructor and Description |
|---|
JavaNetCookieJar(CookieHandler cookieHandler) |
| Modifier and Type | Method and Description |
|---|---|
List<Cookie> |
loadForRequest(HttpUrl url)
Load cookies from the jar for an HTTP request to
url. |
void |
saveFromResponse(HttpUrl url,
List<Cookie> cookies)
Saves
cookies from an HTTP response to this store according to this jar's policy. |
public JavaNetCookieJar(CookieHandler cookieHandler)
public void saveFromResponse(HttpUrl url, List<Cookie> cookies)
CookieJarcookies from an HTTP response to this store according to this jar's policy.
Note that this method may be called a second time for a single HTTP response if the response
includes a trailer. For this obscure HTTP feature, cookies contains only the trailer's
cookies.
saveFromResponse in interface CookieJarpublic List<Cookie> loadForRequest(HttpUrl url)
CookieJarurl. This method returns a possibly
empty list of cookies for the network request.
Simple implementations will return the accepted cookies that have not yet expired and that
match url.
loadForRequest in interface CookieJarCopyright © 2017. All Rights Reserved.