Class: Animoto::HTTPEngines::TyphoeusAdapter
- Defined in:
- lib/animoto/http_engines/typhoeus_adapter.rb
Instance Method Summary collapse
Instance Method Details
#request(method, url, body = nil, headers = {}, options = {}) ⇒ String
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/animoto/http_engines/typhoeus_adapter.rb', line 8 def request method, url, body = nil, headers = {}, = {} response = ::Typhoeus::Request.run(url, { :method => method, :body => body, :headers => headers, :timeout => [:timeout], :username => [:username], :password => [:password], :disable_ssl_peer_verification => true, :proxy => [:proxy] }) [response.code, response.body] end |