NO_COOKIES
Constructor and Description |
---|
RecordingCookieJar() |
Modifier and Type | Method and Description |
---|---|
void |
assertResponseCookies(String... cookies) |
void |
enqueueRequestCookies(Cookie... cookies) |
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. |
List<Cookie> |
takeResponseCookies() |
public void enqueueRequestCookies(Cookie... cookies)
public void assertResponseCookies(String... cookies)
public void saveFromResponse(HttpUrl url, List<Cookie> cookies)
CookieJar
cookies
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 CookieJar
public List<Cookie> loadForRequest(HttpUrl url)
CookieJar
url
. 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 CookieJar
Copyright © 2018. All rights reserved.