lib/elasticsearch/api/actions/get_script_context.rb in elasticsearch-api-7.17.11 vs lib/elasticsearch/api/actions/get_script_context.rb in elasticsearch-api-8.0.0.pre1

- old
+ new

@@ -20,22 +20,25 @@ module Actions # Returns all script contexts. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/painless/7.17/painless-contexts.html + # @see https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html # def get_script_context(arguments = {}) headers = arguments.delete(:headers) || {} + body = nil + arguments = arguments.clone method = Elasticsearch::API::HTTP_GET path = "_script_context" params = {} - body = nil - perform_request(method, path, params, body, headers).body + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers) + ) end end end end