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

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

If you want to store cookies by hand, check out this post: