Skip to content

Instantly share code, notes, and snippets.

@codeprimate
Created November 14, 2008 04:10
Show Gist options
  • Save codeprimate/24782 to your computer and use it in GitHub Desktop.
Save codeprimate/24782 to your computer and use it in GitHub Desktop.
require 'net/http'
require 'net/https'
def get_feed(server,path,username,password)
http = Net::HTTP.new(server,443)
req = Net::HTTP::Get.new(path)
http.use_ssl = true
req.basic_auth username, password
response = http.request(req)
return response.body
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment