Class: Facebook::AccountKit::HTTP
- Inherits:
-
Object
- Object
- Facebook::AccountKit::HTTP
- Defined in:
- lib/facebook/account_kit/http.rb
Class Method Summary collapse
Class Method Details
.get(url) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/facebook/account_kit/http.rb', line 9 def self.get(url) response = Net::HTTP.get_response url parsed_response = JSON.parse(response.body) raise InvalidRequest, parsed_response['error']['message'] if response.code != '200' parsed_response end |