# from http://www.devx.com/enterprise/Article/28101 require 'open-uri' # allows the use of a file like API for URLs open("http://127.0.0.1:9090/foo?bar=123") { |file| lines = file.read puts lines }