-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Net
Milestone
Description
Background and Motivation
There's currently no way to access all cookies in a CookieContainer instance without known their domain names. CookieContainer also does not expose a list of domains it holds cookies for. I propose adding a GetAllCookies() method for this. It seems I'm not the only one with a use-case for it https://stackoverflow.com/questions/15983166/how-can-i-get-all-cookies-of-a-cookiecontainer
Latest API proposal
Based on discussion below - #44094 (comment)
public class CookieContainer
{
// Existing API:
public CookieCollection GetCookies(Uri uri);
// Proposed API:
public CookieCollection GetAllCookies();
}Original API proposal
public IEnumerable<Cookie> GetAllCookies();or
class CookieContainer : IEnumerable<Cookie>D3-LucaPiombino and aepot
Metadata
Metadata
Assignees
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Net