Is there a method or any other way which I can you use to delete all previously stored cookies in Mechanize? It remembers that I'm logged in which in my case is not a good thing. I should need to log in everytime I connect to the page.
After something like
agent = Mechanize.new
agent.get SOMEURL
you can remove all cookies with agent.cookie_jar.clear!
, so the next request of the agent will not send any cookies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With