Created
January 17, 2013 18:34
-
-
Save phwd/4558367 to your computer and use it in GitHub Desktop.
ruby net/http get requests
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 'net/http' | |
API_HOST = "graph.facebook.com" | |
API_BASE_URL = "https://#{API_HOST}" | |
path = "/boo" | |
uri = URI.parse "#{API_BASE_URL}#{path}" | |
http = Net::HTTP.new(uri.host, uri.port) | |
res = http.get(uri.request_uri, nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment