in lib/elastic/transport/transport/http/manticore.rb [89:114]
def perform_request(method, path, params = {}, body = nil, headers = nil, opts = {})
super do |connection, url|
capture_otel_span_attributes(connection, url)
body = body ? __convert_to_json(body) : nil
body, headers = compress_request(body, parse_headers(headers))
params[:body] = body if body
params[:headers] = headers if headers
case method
when 'GET'
resp = connection.connection.get(url, params)
when 'HEAD'
resp = connection.connection.head(url, params)
when 'PUT'
resp = connection.connection.put(url, params)
when 'POST'
resp = connection.connection.post(url, params)
when 'DELETE'
resp = connection.connection.delete(url, params)
else
raise ArgumentError.new "Method #{method} not supported"
end
Response.new(resp.code, resp.read_body, resp.headers)
end
end