Cookie.Comment Property gets or sets a comment that the server can add to a Cookie.
Imports System.Net
Imports System
Public Class CookieExample
Public Shared Sub Main(args() As String)
Dim request As HttpWebRequest = CType(WebRequest.Create("http://google.com"), HttpWebRequest)
request.CookieContainer = New CookieContainer()
Dim response As HttpWebResponse = CType(request.GetResponse(), HttpWebResponse)
Dim cook As Cookie
For Each cook In response.Cookies
Console.WriteLine("{0} = {1}", cook.Name, cook.Value)
Console.WriteLine("Comment: {0}", cook.Comment)
Console.WriteLine("String: {0}", cook.ToString())
Next cook
End Sub
End Class
Related examples in the same category