From: Ara.T.Howard@... Date: 2004-11-11T01:23:30+09:00 Subject: Re: post headers On Wed, 10 Nov 2004, Daun Jaun wrote: > Hi all, > > This is my first mail to this mailing list; > > It will be nice if any one can tell me how to post cookies to a url; > > I have done something like this > > hdr['cookies']= "a_string_representation_of_all_the_cookies" > > # I am not sure about the above step because I havenot found any example which > # posts headers along with cookies in Pragmatic..Ruby > > h=Net::HTTP.new('www.isical.ac.in',80) > resp,data=h.post(path,query,hdr) > > But i am getting error page from the server; > It says "parameter format error" > > Is there any library routine for converting array of cookies to format > that post is expecting perhaps harp:~ > irb -r cgi irb(main):001:0> c=CGI::Cookie.new("rubyweb", "CustID=123", "Part=ABC") => ["CustID=123", "Part=ABC"] irb(main):002:0> c.to_s => "rubyweb=CustID%3D123&Part%3DABC; path=" without you posting the complete code it's hard to say more than this. are you able to post the code, distilled to show the problem? cheers. -a -- =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | When you do something, you should burn yourself completely, like a good | bonfire, leaving no trace of yourself. --Shunryu Suzuki ===============================================================================