Skip to content

Instantly share code, notes, and snippets.

@pengwynn
Created May 13, 2013 21:07
Show Gist options
  • Save pengwynn/5571536 to your computer and use it in GitHub Desktop.
Save pengwynn/5571536 to your computer and use it in GitHub Desktop.
require "net/https"
require "uri"
require "JSON"
uri = URI.parse("https://api.github.com/users/redbush")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri.request_uri)
response = http.request(request)
data = JSON.parse(response.body)
puts data['email']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment