Adding cookies net/http

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:


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?


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: