Class: Elastictastic::ExconAdapter

Inherits:
Adapter
  • Object
show all
Defined in:
lib/elastictastic/adapter.rb

Instance Method Summary collapse

Methods inherited from Adapter

[], #initialize

Methods included from TransportMethods

#delete, #get, #head, #post, #put

Constructor Details

This class inherits a constructor from Elastictastic::Adapter

Instance Method Details

#request(method, path, body = nil) ⇒ Object



55
56
57
58
59
60
61
62
63
# File 'lib/elastictastic/adapter.rb', line 55

def request(method, path, body = nil)
  response = connection.request(
    :body => body, :method => method, :path => path
  )
  Response.new(response.status, response.headers, response.body)
rescue Excon::Errors::Error => e
  connection.reset
  raise ConnectionFailed, e
end