Name

CookieContainer

Synopsis

This class is a container that holds cookies and organizes them by URI. You can add a Cookie or CookieCollection to a container using the simplest forms of the Add() method, or you can use the forms of the Add() method that take a System.Uri argument. You can retrieve all the cookies for a given URI using the GetCookies() method.

Public Class CookieContainer
                  ' Public Constructors
   Public Sub New() 
   Public Sub New( ByVal capacity As Integer) 
   Public Sub New(ByVal capacity As Integer, 
        ByVal perDomainCapacity As Integer, 
        ByVal maxCookieSize As Integer) 
' Public Shared Fields
   Public const DefaultCookieLengthLimit As Integer              // =4096
   Public const DefaultCookieLimit As Integer                    // =300
   Public const DefaultPerDomainCookieLimit As Integer           // =20
                  ' Public Instance Properties
   Public Property Capacity As Integer  
   Public ReadOnly Property Count As Integer  
   Public Property MaxCookieSize As Integer  
   Public Property PerDomainCapacity As Integer  
' Public Instance Methods
   Public Sub Add( ByVal cookie As Cookie) 
   Public Sub Add( ByVal cookies As CookieCollection) 
   Public Sub Add( ByVal uri As Uri, ByVal cookie As Cookie) 
   Public Sub Add(ByVal uri As Uri, 
        ByVal cookies As CookieCollection) 
   Public Function GetCookieHeader(
        ByVal uri As Uri) As String  
   Public Function GetCookies(
        ByVal uri As Uri) As CookieCollection  
   Public Sub SetCookies(ByVal uri As Uri, 
        ByVal cookieHeader As String) 
End Class

Returned By

HttpWebRequest.CookieContainer

Passed To

HttpWebRequest.CookieContainer

Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.