From: Mark Thomas Date: 2008-09-30T23:44:10+09:00 Subject: Re: rest-client get header only On Sep 30, 7:45 am, Keith Langdon wrote: > Hi, using the great rest-client from Adam Wiggins, but I can't seam to > be able work out how to get just the HEAD of a URL. > i.e. in curl I would : curl -I URL > > I'm getting the data just fine with: > return_data = RestClient.get "URL" > > Is there a way of doing this, or should I go about it a different way? The ruby standard library has net/http, with which you can do: require 'net/http' conn = Net::HTTP.start('www.whatever.com') conn.head('/').each_header do |k,v| puts "#{k} = #{v}" end -- Mark.