Skip to content

Instantly share code, notes, and snippets.

@lipchyk
Created December 26, 2012 10:10
Show Gist options
  • Select an option

  • Save lipchyk/4379385 to your computer and use it in GitHub Desktop.

Select an option

Save lipchyk/4379385 to your computer and use it in GitHub Desktop.
require 'net/http'
http = Net::HTTP.new('api.dominder.com')
domain = 'google.com'
email = 'your_email@your-email-server.com'
authKey = 'your-authKey'
format = 'xml'
response = http.start do |http|
request = Net::HTTP::Get.new("/v1/#{domain}?format=#{format}")
request.basic_auth email, authKey
response = http.request(request)
end
puts response.body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment