Class: Restify::HTTP Private
- Inherits:
-
Object
- Object
- Restify::HTTP
- Defined in:
- lib/restify/http.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
- .adapter ⇒ Object private
Instance Method Summary collapse
-
#initialize ⇒ HTTP
constructor
private
A new instance of HTTP.
-
#request(method, uri, data = nil, _opts = {}) ⇒ Object
private
Request given path with given method.
Constructor Details
#initialize ⇒ HTTP
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of HTTP.
9 10 11 |
# File 'lib/restify/http.rb', line 9 def initialize @adapter = self.class.adapter end |
Class Method Details
Instance Method Details
#request(method, uri, data = nil, _opts = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Request given path with given method.
Returns an obligation that will return a collection or resource or fail with a response error depending on response from server.
21 22 23 24 25 |
# File 'lib/restify/http.rb', line 21 def request(method, uri, data = nil, _opts = {}) request = Request.new method: method, uri: uri, data: data @adapter.call(request) end |