how to send a cookie with HTTP request? 
Author Message
 how to send a cookie with HTTP request?


Please if someone can help. What I would like to do is to send a HTTP
request to a web page, along with a cookie. To do that, I'm using this

Function strGetPageHTTPResponse (strURL)
     Dim objHTTP
     Set objHTTP = Wscript.CreateObject("MSXML2.XMLHTTP")
     objHTTP.Open "GET", strURL, False
     objHTTP.setRequestHeader "Cookie", "cookietest=testvalue"
     objHTTP.setRequestHeader "Cookie", "cookietest=testvalue"
     strGetPageHTTPResponse = objHTTP.responseText
     Set objHTTP = Nothing
End Function

This function looks almost exactly like I have found in the article on
http://www.*-*-*.com/ ;en-us;290899 but it just
doesn't work. It seems that it doesn't send this cookie with this line:

 objHTTP.setRequestHeader "Cookie", "cookietest=testvalue"

Any help will be highly appreciated. Thanks!



Sun, 30 Oct 2005 18:22:38 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Sending an HTTP Request

2. Question for send request http in my website

3. Sending username and password in http request?

4. ICP HTTP - send request to cgi-script - HOW ???

5. Sending http Request to a Servlet

6. sending http request through dll running on the server

7. sending http request through dll running on the server

8. Sending HTTP request

9. VB5, Inet, HTTP, Cookies, oh my!

10. Setting Cookies through HTTP Headers

11. HTTP Cookies



Powered by phpBB® Forum Software