Set / get web cookies
1 answer
I saw a post about this that might help in setting the cookie:
Here is his code snippet:
Sub test()
Dim w As New WinHttp.WinHttpRequest
Dim t As String, qs As String
qs = "this=that&more=less"
w.Open "POST", "http://www.comparity.net/perl/form.pl?a=b", False
w.setRequestHeader "Cookie", "one=foo"
w.setRequestHeader "Cookie", "two=bar"
w.send qs
t = w.responseText
WriteTextFile "c:\test.html", t
Debug.Print w.Status
Debug.Print t
End Sub
Not sure about getting the cookie - one of the main posters mentions that XmlHttp removes cookies for security reasons.
Hope you can get started!
+2
source to share