HttpRequestHeadersExtensions.GetCookies Method

 

Namespace:   System.Net.Http
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

Overload List

Name Description
System_CAPS_pubmethodSystem_CAPS_static GetCookies(HttpRequestHeaders)

Gets any cookie headers present in the request.

System_CAPS_pubmethodSystem_CAPS_static GetCookies(HttpRequestHeaders, String)

Gets any cookie headers present in the request that contain a cookie state whose name that matches the specified value.

See Also

HttpRequestHeadersExtensions Class
System.Net.Http Namespace

Return to top

HttpRequestHeadersExtensions.GetCookies Method (HttpRequestHeaders)

Gets any cookie headers present in the request.

Syntax

public static Collection<CookieHeaderValue> GetCookies(
    this HttpRequestHeaders headers
)
public:
[ExtensionAttribute]
static Collection<CookieHeaderValue^>^ GetCookies(
    HttpRequestHeaders^ headers
)
static member GetCookies : 
        headers:HttpRequestHeaders -> Collection<CookieHeaderValue>
<ExtensionAttribute>
Public Shared Function GetCookies (
    headers As HttpRequestHeaders
) As Collection(Of CookieHeaderValue)

Parameters

Return Value

Type: System.Collections.ObjectModel.Collection<CookieHeaderValue>

A collection of CookieHeaderValue instances.

Return to top

HttpRequestHeadersExtensions.GetCookies Method (HttpRequestHeaders, String)

Gets any cookie headers present in the request that contain a cookie state whose name that matches the specified value.

Syntax

public static Collection<CookieHeaderValue> GetCookies(
    this HttpRequestHeaders headers,
    string name
)
public:
[ExtensionAttribute]
static Collection<CookieHeaderValue^>^ GetCookies(
    HttpRequestHeaders^ headers,
    String^ name
)
static member GetCookies : 
        headers:HttpRequestHeaders *
        name:string -> Collection<CookieHeaderValue>
<ExtensionAttribute>
Public Shared Function GetCookies (
    headers As HttpRequestHeaders,
    name As String
) As Collection(Of CookieHeaderValue)

Parameters

Return Value

Type: System.Collections.ObjectModel.Collection<CookieHeaderValue>

A collection of CookieHeaderValue instances.

Return to top