Skip to content

Instantly share code, notes, and snippets.

@eveevans
Created September 21, 2011 16:32
Show Gist options
  • Save eveevans/1232560 to your computer and use it in GitHub Desktop.
Save eveevans/1232560 to your computer and use it in GitHub Desktop.
http headers
require 'rubygems'
require 'net/http'
url = URI.parse('http://laurel.datsi.fi.upm.es/index.php')
req = Net::HTTP::Get.new(url.path)
req.add_field 'Range', 'bytes=714-732'
res = Net::HTTP.start(url.host, url.port) {|http|
http.request(req)
}
puts res.body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment