Class: OrientdbClient::HttpAdapters::TyphoeusAdapter

Inherits:
Base
  • Object
show all
Defined in:
lib/orientdb_client/http_adapters/typhoeus_adapter.rb

Instance Attribute Summary

Attributes inherited from Base

#password, #username

Instance Method Summary collapse

Methods inherited from Base

#initialize, #reset_credentials

Constructor Details

This class inherits a constructor from OrientdbClient::HttpAdapters::Base

Instance Method Details

#request(method, url, options = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/orientdb_client/http_adapters/typhoeus_adapter.rb', line 7

def request(method, url, options = {})
  req = prepare_request(method, url, options)
  response = run_request(req)
  if response.return_message == "Couldn't connect to server".freeze
    raise ConnectionError
  elsif response.timed_out?
    timed_out!(method, url)
  else
    return response
  end
end