lib/elasticsearch/api/actions/watcher/stop.rb in elasticsearch-api-8.10.0 vs lib/elasticsearch/api/actions/watcher/stop.rb in elasticsearch-api-8.11.0

- old
+ new

@@ -24,23 +24,25 @@ module Actions # Stops Watcher if it is running. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-stop.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.11/watcher-api-stop.html # def stop(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "watcher.stop" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil method = Elasticsearch::API::HTTP_POST path = "_watcher/_stop" params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end end end