From: Francis Hwang Date: 2004-12-05T09:27:15+09:00 Subject: Re: Sending a cookie in the request using Net::HTTP Works like a charm. Thanks! On Dec 4, 2004, at 5:15 PM, Jos Backus wrote: > 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' > > Francis Hwang http://fhwang.net/