GetCookieHeader Method
Collapse the table of content
Expand the table of content

CookieContainer.GetCookieHeader Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets the HTTP cookie header that contains cookies pertaining to the specified Uniform Resource Identifier (URI).

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

'Declaration
Public Function GetCookieHeader ( _
	uri As Uri _
) As String

Parameters

uri
Type: System.Uri
The URI to retrieve cookies for.

Return Value

Type: System.String
A string representing the cookie header associated with the specified URI.

ExceptionCondition
ArgumentNullException

uri is Nothing.

The HTTP cookie header is created by adding a string representation of each cookie associated with the specified URI; seperating each cookie in the string with a semicolon. The exact format of each cookie string depends on the RFC the cookie conforms to.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft