I\'m trying to use the Ruby version of Mechanize to extract my employer\'s tickets from a ticket management system that we\'re moving away from that does not supply an API.<
Mechanize would automatically send cookies obtained from the response in the consecutive request. You can use the same agent without re-new.
require 'mechanize' @agent = Mechanize.new @agent.post(create_sessions_url, params, headers) @agent.get(ticket_url)
Tested with mechanize 2.7.6.
mechanize 2.7.6