Method: OpenSearch::Transport::Client#perform_request
- Defined in:
- lib/opensearch/transport/client.rb
#perform_request(method, path, params = {}, body = nil, headers = nil) ⇒ Object
Performs a request through delegation to #transport.
186 187 188 189 190 191 192 193 194 |
# File 'lib/opensearch/transport/client.rb', line 186 def perform_request(method, path, params = {}, body = nil, headers = nil) method = @send_get_body_as if 'GET' == method && body if (opaque_id = params.delete(:opaque_id)) headers = {} if headers.nil? opaque_id = @opaque_id_prefix ? "#{@opaque_id_prefix}#{opaque_id}" : opaque_id headers.merge!('X-Opaque-Id' => opaque_id) end transport.perform_request(method, path, params, body, headers) end |