Mohammed Rafiq P Mohammed Rafiq P - 6 months ago 85
Ruby Question

Mechanize Ruby: Print Cookies

When I do agent.get(URL) I get blank results while when I access the URL directly I can see the results. Is it because some cookies are passed to the result page? Can you please help me to print cookies before agent.get(URL) so that I will know what is being passed?


I could solve this by adding the cookies before submitting the form.

agent =
cookie = '#{name}', value: '#{value}', domain: '#{domain}', path: '/')