public interface CookieStore
CookieManager will call
CookieStore.add to save cookies
for every incoming HTTP response, and call
retrieve cookie for every outgoing HTTP request. A CookieStore
is responsible for removing HttpCookie instances which have expired.
|Modifier and Type||Method and Description|
Remove all cookies in this cookie store.
Retrieve cookies associated with given URI, or whose domain matches the given URI.
Get all not-expired cookies in cookie store.
Remove a cookie from store.
void add(Uri uri, io.netty.handler.codec.http.cookie.Cookie cookie)
Cookieto the store. This is called for every incoming HTTP response. If the given cookie has already expired it will not be added, but existing values will still be removed.
A cookie to store may or may not be associated with an URI. If it is not associated with an URI, the cookie's domain and path attribute will indicate where it comes from. If it is associated with an URI and its domain and path attribute are not specified, given URI will indicate where this cookie comes from.
If a cookie corresponding to the given URI already exists, then it is replaced with the new one.
urithis cookie associated with. if
null, this cookie will not be associated with an URI
cookieto be added
java.util.List<io.netty.handler.codec.http.cookie.Cookie> get(Uri uri)
uriassociated with the cookies to be returned
boolean remove(java.util.function.Predicate<io.netty.handler.codec.http.cookie.Cookie> predicate)
predicate- that indicates what cookies to remove
trueif this store contained the specified cookie
Copyright © 2018. All Rights Reserved.