/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
require 'net/http' require 'uri' url = URI.parse('http://www.example.com/index.html') res = Net::HTTP.start(url.host, url.port) do |http| http.get('/index.html') end puts res.body