CookieManager class

Manages a collection of cookies for a set of URIs.

public sealed class CookieManager

Public Members

name description
CookieManager() Initializes a new instance of the CookieManager class.
CookieManager(…) Initializes a new instance of the CookieManager class.
CookieContainer { get; } Returns a reference to the CookieContainer for this instance.
event CookiesChanged Raised when cookies are changed.
ExpireCookies() Expires the cookies, and raising the CookiesChanged event if there were any cookies (even potentially already expired ones).
GetCookieHeader(…) Gets the HTTP Cookie header for the specified URI.
GetCookies() Gets the collection of cookies contained in this CookieManager instance.
GetUriCookies() Gets the collection of cookies contained in this CookieManager instance.
SetCookies(…) Adds UriCookieHeader instances for one or more cookies from an HTTP cookie header to the CookieManager for a specific URI.

Remarks

This class is thread-safe.

See Also