lib/elasticsearch/transport/transport/http/faraday.rb in elasticsearch-transport-6.0.1 vs lib/elasticsearch/transport/transport/http/faraday.rb in elasticsearch-transport-6.0.2

- old
+ new

@@ -14,12 +14,12 @@ # Performs the request by invoking {Transport::Base#perform_request} with a block. # # @return [Response] # @see Transport::Base#perform_request # - def perform_request(method, path, params={}, body=nil) + def perform_request(method, path, params={}, body=nil, headers=nil) super do |connection, url| - headers = connection.connection.headers + headers = headers || connection.connection.headers response = connection.connection.run_request \ method.downcase.to_sym, url, ( body ? __convert_to_json(body) : nil ),