Typhoeus::Request.get("www.example.com", cookiefile: "/path/to/file", cookiejar: "/path/to/file")
Here, cookiefile
is a file to read cookies to send from, and cookiejar
is a file to write received cookies to. So, if you just want cookies enabled, you need to pass in a same filename in both options.
Hope it help :-)
Hello,
Thank you Denis for jumping in! Your solution is the most elegant one!
Unfortunately people were having trouble with the cookiejar and cookiefile options. If you're one of these Thad then you're better off with looking into the headers on your own and to pass the cookies manually.
Another thing I noticed in your example is that you encode the body yourself. That's not necessary, you can pass a hash to body and Typhoeus will take care of that.
--
You received this message because you are subscribed to the Google Groups "Typhoeus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to typhoeus+u...@googlegroups.com.
To post to this group, send email to typh...@googlegroups.com.
Visit this group at http://groups.google.com/group/typhoeus.
For more options, visit https://groups.google.com/groups/opt_out.