HttpCookieManager Class

Definition

Add or delete an HttpCookie or view the cookies associated with an app.

public ref class HttpCookieManager sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class HttpCookieManager final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class HttpCookieManager final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class HttpCookieManager
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class HttpCookieManager
Public NotInheritable Class HttpCookieManager
Inheritance
Object Platform::Object IInspectable HttpCookieManager
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

The HttpCookieManager object is used to add or delete an HttpCookie or view the cookies associated with an app.

The CookieManager property on HttpBaseProtocolFilter returns an HttpCookieManager object. To construct an HttpCookieManager, an HttpBaseProtocolFilter object is first created and then the CookieManager property on HttpBaseProtocolFilter returns the HttpCookieManager object.

Methods

DeleteCookie(HttpCookie)

Delete an HttpCookie from the cookies associated with an app.

GetCookies(Uri)

Gets an HttpCookieCollection that contains the HttpCookie instances that are associated with a specific URI.

SetCookie(HttpCookie)

Add or change an HttpCookie in the cookies associated with an app that is sent on future requests.

SetCookie(HttpCookie, Boolean)

Add or change an HttpCookie in the cookies associated with an app.

Applies to

See also