Class: Goldfinger::Request
- Inherits:
-
Object
- Object
- Goldfinger::Request
- Defined in:
- lib/goldfinger/request.rb
Instance Method Summary collapse
-
#initialize(request_method, path, options = {}) ⇒ Request
constructor
A new instance of Request.
- #perform ⇒ Object
Constructor Details
#initialize(request_method, path, options = {}) ⇒ Request
Returns a new instance of Request.
6 7 8 9 10 |
# File 'lib/goldfinger/request.rb', line 6 def initialize(request_method, path, = {}) @request_method = request_method @uri = Addressable::URI.parse(path) @options = end |
Instance Method Details
#perform ⇒ Object
12 13 14 15 |
# File 'lib/goldfinger/request.rb', line 12 def perform response = http_client.request(@request_method, @uri.to_s, @options) [response.headers, response.body] end |