lib/elasticsearch/api/actions/shutdown/put_node.rb in elasticsearch-api-7.17.11 vs lib/elasticsearch/api/actions/shutdown/put_node.rb in elasticsearch-api-8.0.0.pre1
- old
+ new
@@ -31,19 +31,22 @@
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
raise ArgumentError, "Required argument 'node_id' missing" unless arguments[:node_id]
headers = arguments.delete(:headers) || {}
+ body = arguments.delete(:body)
+
arguments = arguments.clone
_node_id = arguments.delete(:node_id)
method = Elasticsearch::API::HTTP_PUT
path = "_nodes/#{Utils.__listify(_node_id)}/shutdown"
params = {}
- body = arguments[:body]
- perform_request(method, path, params, body, headers).body
+ Elasticsearch::API::Response.new(
+ perform_request(method, path, params, body, headers)
+ )
end
end
end
end
end