How to download cookies in ruby?

Hi
So I was trying to figure out how to download cookies in ruby, I know
how to use wget to do that:

wget
–save-cookies ~/.cookies/rapidshare
–post-data “login=USERNAME&password=PASSWORD”
-O -
https://ssl.rapidshare.com/cgi-bin/premiumzone.cgi
> /dev/null

But I would like to know ruby’s equivalent, Thanks
Chris

chutsu wrote:

But I would like to know ruby’s equivalent, Thanks

Add watir, mechanize, webrat, or just “net::http” to your El Goog search
terms!

Functional tests on HTTP, including cookies, is a well-explored area
around here…