Class: Animoto::HTTPEngines::RestClientAdapter
- Defined in:
- lib/animoto/http_engines/rest_client_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/rest_client_adapter.rb', line 8 def request method, url, body = nil, headers = {}, = {} RestClient.proxy = [:proxy] response = ::RestClient::Request.execute({ :method => method, :url => url, :headers => headers, :payload => body, :user => [:username], :password => [:password], :timeout => [:timeout] }) [response.code, response.body] end |