From: Dimitri Aivaliotis Date: 2006-03-29T18:26:00+09:00 Subject: Re: Retrieving the Date Header with https-access2 On 3/29/06, hoyhoy@gmail.com wrote: > I've been trying to figure out how to retrieve a http head request > date using http-access2. > > I thought this could work: > > h = HTTPAccess2::Client.new() > res = h.head('http://involution.com') > print response.header['date'],"\n" ^^^^^^^^^ maybe that typo has something to do with your getting Time.now. It's retrieved correctly here: h = HTTPAccess2::Client.new() res = h.head('http://involution.com') puts res.header['date'] => Wed, 29 Mar 2006 09:20:17 GMT Time.now => Wed Mar 29 11:20:50 CEST 2006 require 'pp' pp res @header_item= [["Date", "Wed, 29 Mar 2006 09:20:17 GMT"], ["Server", "Apache/2.0.52 (Red Hat)"], ["X-Powered-By", "PHP/4.3.9"], ["X-Pingback", "http://involution.com/xmlrpc.php"], ["Connection", "close"], ["Content-Type", "text/html; charset=UTF-8"]], - Dimitri