Skip to content

Instantly share code, notes, and snippets.

@noplans
Created April 15, 2009 14:40
Show Gist options
  • Save noplans/95800 to your computer and use it in GitHub Desktop.
Save noplans/95800 to your computer and use it in GitHub Desktop.
require 'open-uri'
uri = URI.parse('http://ruby-sapporo.org')
uri.read.meta # => {"etag"=>"\"27711ef804dc268552cd51352c05193b\"", "x-powered-by"=>"Phusion Passenger (mod_rails/mod_rack) 2.0.3", "last-modified"=>"Mon, 06 Apr 2009 01:06:43 GMT", "connection"=>"close", "via"=>"1.0 proxy.do-johodai.ac.jp:8080 (squid/2.6.STABLE5)", "content-type"=>"text/html; charset=utf-8", "x-cache-lookup"=>"HIT from proxy.do-johodai.ac.jp:8080", "x-cache"=>"HIT from proxy.do-johodai.ac.jp", "x-runtime"=>"0.46381", "server"=>"Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g Phusion_Passenger/2.0.3", "date"=>"Mon, 06 Apr 2009 01:06:42 GMT", "content-length"=>"14493", "age"=>"129771"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment