CookieManagerCompat


@AnyThread
class CookieManagerCompat


Compatibility version of android.webkit.CookieManager

Summary

Public functions

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

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

Public functions

getCookieInfo

Added in 1.6.0
@RequiresFeature(name = WebViewFeature.GET_COOKIE_INFO, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
java-static fun getCookieInfo(cookieManager: CookieManager, url: String): (Mutable)List<String!>

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
cookieManager: CookieManager

The CookieManager instance to get info from.

url: String

the URL for which the API retrieves all available cookies.

Returns
(Mutable)List<String!>

the cookies as a list of strings.