Never been to DZone Snippets before?
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
About this user
JavaScript Wizard
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total
RSS
Found at
http://www.juretta.com/log/2006/08/13/ruby_net_http_and_open-uri/
require 'open-uri'
require 'pp'
open('http://www.juretta.com/') do |f|
pp f.meta
pp "Content-Type: " + f.content_type
pp "last modified" + f.last_modified.to_s
no = 1
f.each do |line|
print "#{no}: #{line}"
no += 1
break if no > 4
end
end
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total
RSS