Class: Restful::Backends::Typhoeus

Inherits:
Object
  • Object
show all
Defined in:
lib/dm-restful-adapter/backends/typhoeus.rb

Class Method Summary collapse

Class Method Details

.call(method, path, params = {}) ⇒ Object



4
5
6
7
# File 'lib/dm-restful-adapter/backends/typhoeus.rb', line 4

def self.call(method, path, params={})
  response = ::Typhoeus::Request.run(path, :method => method, :params => params)
  ::Restful::Response.new(:body => Configuration.parser.decode(response.body), :status => response.code)
end