How to Store Cookies in Ruby?

Posted by viatropos on Stack Overflow See other posts from Stack Overflow or by viatropos
Published on 2010-04-11T02:14:01Z Indexed on 2010/04/11 2:23 UTC
Read the original article Hit count: 290

Filed under:
|
|

I am programmatcally accessing authenticated content in my CDN on Google App Engine, and it's returning a cookie that I'm supposed to store:

{"set-cookie"=>"ACSID=cookie-hash; expires=Mon, 12-Apr-2010 01:56:06 GMT; path=/"}

What do I do with that? This is my first time dealing with Cookies.

I can put in the header of the next request, but what's the recommended way to store that? I'm testing this with irb in the console and when I exit and try again, the cookie is gone.

How do I save it for a few days/weeks? I'm using pure ruby without Rails or anything.

Thanks so much.

© Stack Overflow or respective owner

Related posts about ruby

Related posts about cookies