From: Jos Backus Date: 2004-12-05T07:15:30+09:00 Subject: Re: Sending a cookie in the request using Net::HTTP On Sun, Dec 05, 2004 at 02:07:17AM +0900, Francis Hwang wrote: > I can't find this answered in the RDoc, so I'll ask here: How do I send > the cookie string in an HTTP request using Net::HTTP? I tried doing > something like: > > Net::HTTP.start( 'server.host.here' ) { |http| > response = http.get( > '/local/file.rb', Try passing any extra headers in a hash here, like this: {"Cookie" => 'cookie_name=cookie_val; another_cookie=brownie'} > 'Cookie: cookie_name=cookie_val' > ) > } -- Jos Backus _/ _/_/_/ Sunnyvale, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ jos at catnook.com _/_/ _/_/_/ require 'std/disclaimer'