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

Hello,

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:

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"
     objHTTP.Send
     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!

Regards,

Denis



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

12. http://www.besamung.de.vu http://www.besamung.de.vu http://www.besamung.de.vu http://www.besamung.de.vu http://www.besamung.de.vu http://www.besamung.de.vu

 

 
Powered by phpBB® Forum Software