Sha256: cf11eb1e2760711a5f8afe4c21737beca4a29353d5d6d221fcb9c1b83c6336f7
Contents?: true
Size: 376 Bytes
Versions: 6
Compression:
Stored size: 376 Bytes
Contents
#!/usr/bin/env ruby require 'net/http' url = URI.parse("http://www.bestbuy.com/shop/thermometers") req = Net::HTTP::Get.new(url.path) req.add_field("User-Agent", "Ruby RDF Distiller") Net::HTTP.start(url.host, url.port) do |http| http.request(req) do |res| res.value # Raises HTTP error, unless response is successful puts "read returned:\n#{res.body}" end end
Version data entries
6 entries across 6 versions & 1 rubygems