From: Thufir Date: 2010-02-02T03:29:13+09:00 Subject: Re: cookiejar without cgi On Feb 1, 6:05 am, Brian Candler wrote: [...] > > How can I do that without cgi? > > By emitting a Set-Cookie: header directly?http://en.wikipedia.org/wiki/HTTP_cookie#Implementation > > You can always look at the source of CGI::Cookie to see what it does, > and incorporate the bits you want. What's the reason for not using it? What I meant to ask is how to do that from the curb library. There's: curl = Curl::Easy.new('http://example.com/') curl.cookies = 'auth=abcdef; ASP.NET_SessionId=big-wall-of-text;' curl.perform http://blog.codefront.net/2009/06/18/better-cookie-support-in-curb/ but can the curb API create the same cookie as the cgi API, and, if so, how? For convenience, I'd like to use just as few different API's as possible, where possible. Alternately, how can that cookie created from the cgi API be used by the curb API? Add the cookie to a cookiejar which curb can access? -Thufir