-
-
Save aruprakshit/84c280159f3e89167508 to your computer and use it in GitHub Desktop.
This file contains 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
uri = URI('https://xxxx.com/feeds/feed.json?full=1') | |
article_json = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http| | |
request = Net::HTTP::Get.new uri | |
request.basic_auth "xxx", "xx!" | |
response = http.request request | |
JSON.parse response.read_body | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment