Skip to content

Instantly share code, notes, and snippets.

@jerzygangi
Created May 31, 2015 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jerzygangi/352736500f45db383142 to your computer and use it in GitHub Desktop.
Save jerzygangi/352736500f45db383142 to your computer and use it in GitHub Desktop.
How to get JSON with Ruby
require "rubygems"
require "json"
require "net/http"
response = Net::HTTP.get_response(URI.parse("https://api.bitcoinaverage.com/exchanges/USD"))
puts response.body
puts JSON.parse(response.body)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment