public interface CookieJar
As policy, implementations of this interface are responsible for selecting which cookies to accept and which to reject. A reasonable policy is to reject all cookies, though that may interfere with session-based authentication schemes that require cookies.
As persistence, implementations of this interface must also provide storage of cookies. Simple implementations may store cookies in memory; sophisticated ones may use the file system or database to hold accepted cookies. The cookie storage model specifies policies for updating and expiring cookies.
| Modifier and Type | Field and Description |
|---|---|
static CookieJar |
NO_COOKIES
A cookie jar that never accepts any cookies.
|
| Modifier and Type | Method and Description |
|---|---|
List<Cookie> |
loadForRequest(HttpUrl url) |
void |
saveFromResponse(HttpUrl url,
List<Cookie> cookies) |
Copyright © 2019. All rights reserved.