require 'open-uri' f = open('http://www.rubyinside.com/test.txt') puts f.content_type puts f.charset puts f.last_modified