Adding cookies net/http

Hi,
when I call different pages I get on response ["set-cookie"] so i need
to add the new cookies to my http connection by doing:

headers={'Cookie'=>resp.response["set-cookie"]}

and then when I call post or get methods pass my headers

But when I give the new cookies I think I'm missing the old ones, how
can I keep all cookies on my connection?

Thanks

···

--
Posted via http://www.ruby-forum.com/.

How about using Mechanize, which automatically stores cookies and adds
them to requests?

If you want to do it by hand yourself, check out this post:

···

--
Posted via http://www.ruby-forum.com/.