Created
November 14, 2008 04:10
-
-
Save codeprimate/24782 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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