CookieManagerCompat


@AnyThread
public class CookieManagerCompat


Compatibility version of android.webkit.CookieManager

Summary

Public methods

static @NonNull List<String>
@RequiresFeature(name = WebViewFeature.GET_COOKIE_INFO, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
getCookieInfo(@NonNull CookieManager cookieManager, @NonNull String url)

Gets all the cookies for the given URL along with their set attributes.

Public methods

getCookieInfo

Added in 1.6.0
@RequiresFeature(name = WebViewFeature.GET_COOKIE_INFO, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
public static @NonNull List<StringgetCookieInfo(@NonNull CookieManager cookieManager, @NonNull String url)

Gets all the cookies for the given URL along with their set attributes. The cookies are returned in the format of the HTTP 'Set-Cookie' header as defined in the RFC6265 spec. eg. "name=value; domain=.example.com; path=/"

Parameters
@NonNull CookieManager cookieManager

The CookieManager instance to get info from.

@NonNull String url

the URL for which the API retrieves all available cookies.

Returns
@NonNull List<String>

the cookies as a list of strings.