Compartilhar via


CookieHandler.Get(URI, IDictionary<String,IList<String>>) Method

Definition

Gets all the applicable cookies from a cookie cache for the specified uri in the request header.

[Android.Runtime.Register("get", "(Ljava/net/URI;Ljava/util/Map;)Ljava/util/Map;", "GetGet_Ljava_net_URI_Ljava_util_Map_Handler")]
public abstract System.Collections.Generic.IDictionary<string,System.Collections.Generic.IList<string>>? Get (Java.Net.URI? uri, System.Collections.Generic.IDictionary<string,System.Collections.Generic.IList<string>>? requestHeaders);
[<Android.Runtime.Register("get", "(Ljava/net/URI;Ljava/util/Map;)Ljava/util/Map;", "GetGet_Ljava_net_URI_Ljava_util_Map_Handler")>]
abstract member Get : Java.Net.URI * System.Collections.Generic.IDictionary<string, System.Collections.Generic.IList<string>> -> System.Collections.Generic.IDictionary<string, System.Collections.Generic.IList<string>>

Parameters

uri
URI

a URI representing the intended use for the cookies

requestHeaders
IDictionary<String,IList<String>>
  • a Map from request header field names to lists of field values representing the current request headers

Returns

an immutable map from state management headers, with field names "Cookie" or "Cookie2" to a list of cookies containing state information

Attributes

Remarks

Gets all the applicable cookies from a cookie cache for the specified uri in the request header.

The URI passed as an argument specifies the intended use for the cookies. In particular the scheme should reflect whether the cookies will be sent over http, https or used in another context like javascript. The host part should reflect either the destination of the cookies or their origin in the case of javascript.

It is up to the implementation to take into account the URI and the cookies attributes and security settings to determine which ones should be returned.

HTTP protocol implementers should make sure that this method is called after all request headers related to choosing cookies are added, and before the request is sent.

Java documentation for java.net.CookieHandler.get(java.net.URI, java.util.Map<java.lang.String, java.util.List<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