My Snippets

Reading a text file at a given URL

RUBY:
  1. require 'net/http'
  2. Net::HTTP.start( 'www.ruby-lang.org', 80 ) do |http|
  3. print( http.get( '/en/LICENSE.txt' ).body )
  4. end

September 30th, 2007 Posted by | ruby | no comments
[]