lib/elasticsearch/api/actions/watcher/query_watches.rb in elasticsearch-api-8.0.0 vs lib/elasticsearch/api/actions/watcher/query_watches.rb in elasticsearch-api-8.0.1

- old
+ new

@@ -25,14 +25,13 @@ # @option arguments [Hash] :body From, size, query, sort and search_after # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-query-watches.html # def query_watches(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = if body Elasticsearch::API::HTTP_POST else Elasticsearch::API::HTTP_GET