Class: Hydrogen::Request
- Inherits:
-
Object
- Object
- Hydrogen::Request
- Defined in:
- lib/hydrogen/request.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Request
constructor
A new instance of Request.
- #perform_get(path, query = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Request
Returns a new instance of Request.
5 6 7 |
# File 'lib/hydrogen/request.rb', line 5 def initialize(={}) = {:mash => true}.merge() end |
Instance Method Details
#perform_get(path, query = {}) ⇒ Object
10 11 12 13 |
# File 'lib/hydrogen/request.rb', line 10 def perform_get(path, query={}) response = HTTParty.get("#{@options[:base_uri]}#{path}", :query => query) perform(response) end |