agent.cookies
is an array. Maybe you want:
agent.cookies.join('; ')
Question
I'm parsing a bunch of documents in parallel, and I'd love to do it using asynchronous web requests.
I tried to integrate typhoeus with mechanize, but encountered a problem with passing cookies from mechanize.
My steps:
I'm sending request as:
Typhoeus::Request.new("http://example.com", headers: {'Cookie' => agent.cookies})
where agent
is a mechanize instance.
Is there a way to integrate Mechanize with Eventmachine or Typhoeus?
Solution
agent.cookies
is an array. Maybe you want:
agent.cookies.join('; ')