Class: Dino::Clients::Http
- Inherits:
-
Object
- Object
- Dino::Clients::Http
- Defined in:
- lib/dino/clients/http.rb
Direct Known Subclasses
Constant Summary collapse
- InvalidResponse =
Class.new(StandardError)
Instance Method Summary collapse
Instance Method Details
#fetch_data(url, options) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/dino/clients/http.rb', line 8 def fetch_data(url, ) response = ::HTTParty.get(url) if response.ok? response.parsed_response else raise InvalidResponse, response.parsed_response end end |