how to manually add a cookie to Mechanize state?
Posted
by fearless_fool
on Stack Overflow
See other posts from Stack Overflow
or by fearless_fool
Published on 2010-03-30T23:26:32Z
Indexed on
2010/03/30
23:33 UTC
Read the original article
Hit count: 310
[I'm working in Ruby, but my question is valid for other languages as well.]
I have a Mechanize-driven application. The server I'm talking to sets a cookie using javascript (rather than standard set-cookie), so Mechanize doesn't catch the cookie. I need to pass that cookie back on the next GET request.
The good news is that I already know the value of the cookie, but I don't know how to tell Mechanize to include it in my next GET request.
Pointers or suggestions are welcome. Thanks in advance.
-ff
© Stack Overflow or respective owner