httpclient icon indicating copy to clipboard operation
httpclient copied to clipboard

Best way to access a cookie

Open hartator opened this issue 13 years ago • 0 comments

Right now, I am doing this :

clnt.cookies.select{ |e| e.name == 'SID' }.first.value

Am I doing this wrong? It seems more quicker to access cookies like a hash, like this :

clnt.cookies[ 'SID' ]

Anyway, thanks nahi, for great library, I was desperate to find something like this in Ruby! :)

hartator avatar Nov 01 '12 17:11 hartator