Created
June 29, 2012 07:40
-
-
Save kaosf/3016510 to your computer and use it in GitHub Desktop.
uri, net/http, multi_json memo ref: http://qiita.com/items/100c5da99fad8751231c
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 'uri' | |
require 'net/http' | |
require 'multi_json' | |
uri = URI.parse('http://exapmle.com/contents/1.json') | |
res = Net::HTTP.get_response(uri) | |
json = MultiJson.load(res.body, symbolize_keys: true) | |
p json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment