Skip to content

Instantly share code, notes, and snippets.

@aruprakshit
Created July 9, 2015 12:12
Show Gist options
  • Save aruprakshit/84c280159f3e89167508 to your computer and use it in GitHub Desktop.
Save aruprakshit/84c280159f3e89167508 to your computer and use it in GitHub Desktop.
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