lib/elasticsearch/transport/transport/http/faraday.rb in elasticsearch-transport-2.0.2 vs lib/elasticsearch/transport/transport/http/faraday.rb in elasticsearch-transport-5.0.0.pre
- old
+ new
@@ -16,14 +16,17 @@
# @return [Response]
# @see Transport::Base#perform_request
#
def perform_request(method, path, params={}, body=nil)
super do |connection, url|
+ headers = connection.connection.headers
+
response = connection.connection.run_request \
method.downcase.to_sym,
url,
( body ? __convert_to_json(body) : nil ),
- {}
+ headers
+
Response.new response.status, response.body, response.headers
end
end
# Builds and returns a connection