Share via


CookieManager.GetCookie(String) Method

Definition

Gets all the cookies for the given URL.

[Android.Runtime.Register("getCookie", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetCookie_Ljava_lang_String_Handler")]
public abstract string? GetCookie (string? url);
[<Android.Runtime.Register("getCookie", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetCookie_Ljava_lang_String_Handler")>]
abstract member GetCookie : string -> string

Parameters

url
String

the URL for which the cookies are requested

Returns

value the cookies as a string, using the format of the 'Cookie' HTTP request header

Attributes

Remarks

Gets all the cookies for the given URL. This may return multiple key-value pairs if multiple cookies are associated with this URL, in which case each cookie will be delimited by "; " characters (semicolon followed by a space). Each key-value pair will be of the form "key=value".

Java documentation for android.webkit.CookieManager.getCookie(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to