class Octo::Search::Client

Constants

CONNECTION

Public Instance Methods

perform_request(method, path, params, body) click to toggle source

Low level method for performing a request to Elastic Search cluster @param [String] method The method ex: get, put, post, etc.. @param [String] path The path of the request @param [Hash] params The params of the request @param [String] body The body of the request

# File lib/octocore/search/client.rb, line 21
def perform_request(method, path, params, body)
  Octo.logger.debug "--> #{method.upcase} #{path} #{params} #{body}"

  CONNECTION.run_request \
    method.downcase.to_sym,
    path,
    ( body ? MultiJson.dump(body): nil ),
    {'Content-Type' => 'application/json'}
end