From: Doug Kearns Date: 2004-11-11T07:01:26+09:00 Subject: Re: Hi On Wed, Nov 10, 2004 at 10:49:20PM +0900, Daun Jaun wrote: > Hi > Can some one please tell me how to encode the headers(HTTP request) in the call > to HTTP post method > > the signature of post was > > def Net::Http.post( path, query, header ) > > But no where in the manual can i found something about this header > except that its a HASH To find out more about HTTP headers: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html require 'net/http' Net::HTTP.start('localhost', 80) { |http| response = http.post('/index.html', {'Host' => 'localhost', 'User-Agent' => 'MyBrowser'}); } Regards, Doug