user1702595 user1702595 - 8 months ago 50
Ruby Question

How do I Express this PHP in Ruby?

I need a neat and tidy and elegant way to do this in Ruby. It is a simple get what is on teh page and out put it tot eh screen.

echo file_get_contents("");


You can use net/http like this:

require 'net/http'
puts Net::HTTP.get('', '/')

You can also use get_print, like this:

Net::HTTP.get_print('', '/')