尝试更新网站上的现有Cookie。
这是我尝试过的:
Private Sub UpdateCookie()
Dim cookieContainer As CookieContainer = New CookieContainer()
Dim CookieChange As Cookie = New Cookie("cookieName", "coookieValue", "/", "myurl.com")
cookieContainer.Add(CookieChange)
Dim request As HttpWebRequest = CType(WebRequest.Create("https://myurl.com/"), HttpWebRequest)
request.CookieContainer = cookieContainer
Dim response As System.Net.HttpWebResponse = request.GetResponse()
Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
Dim sourcecode As String = sr.ReadToEnd()
TextBox1.Text = sourcecode
End Sub