ICookieStore.Add(URI, HttpCookie) Method

Definition

Adds one HTTP cookie to the store.

[Android.Runtime.Register("add", "(Ljava/net/URI;Ljava/net/HttpCookie;)V", "GetAdd_Ljava_net_URI_Ljava_net_HttpCookie_Handler:Java.Net.ICookieStoreInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void Add (Java.Net.URI? uri, Java.Net.HttpCookie? cookie);
[<Android.Runtime.Register("add", "(Ljava/net/URI;Ljava/net/HttpCookie;)V", "GetAdd_Ljava_net_URI_Ljava_net_HttpCookie_Handler:Java.Net.ICookieStoreInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Add : Java.Net.URI * Java.Net.HttpCookie -> unit

Parameters

uri
URI

the uri this cookie associated with. if null, this cookie will not be associated with an URI

cookie
HttpCookie

the cookie to store

Attributes

Remarks

Adds one HTTP cookie to the store. This is called for every incoming HTTP response.

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.

Java documentation for java.net.CookieStore.add(java.net.URI, java.net.HttpCookie).

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