Skip to content

Instantly share code, notes, and snippets.

@benbonnet
Created May 28, 2009 14:19
Show Gist options
  • Save benbonnet/119334 to your computer and use it in GitHub Desktop.
Save benbonnet/119334 to your computer and use it in GitHub Desktop.
require 'net/http'
require 'rexml/document'
http = Net::HTTP.new('www.google.com', 443)
http.use_ssl = true
path = "/webmasters/tools/feeds/sites/"
headers = {'Authorization' => "AuthSub token=\"#{api.token}\""}
resp, data = http.get(path, headers)
@doc = Hpricot.XML(open(data.body))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment