lib/elasticsearch/api/actions/tasks/list.rb in elasticsearch-api-7.6.0 vs lib/elasticsearch/api/actions/tasks/list.rb in elasticsearch-api-7.7.0.pre

- old
+ new

@@ -15,22 +15,24 @@ # @option arguments [Boolean] :wait_for_completion Wait for the matching tasks to complete (default: false) # @option arguments [String] :group_by Group tasks by nodes or parent/child relationships # (options: nodes,parents,none) # @option arguments [Time] :timeout Explicit operation timeout - + # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/tasks.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html # def list(arguments = {}) + headers = arguments.delete(:headers) || {} + arguments = arguments.clone method = Elasticsearch::API::HTTP_GET path = "_tasks" params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil - perform_request(method, path, params, body).body + perform_request(method, path, params, body, headers).body end # Register this action with its valid params when the module is loaded. # # @since 6.2.0