lib/elasticsearch/transport/transport/http/faraday.rb in elasticsearch-transport-6.8.1 vs lib/elasticsearch/transport/transport/http/faraday.rb in elasticsearch-transport-6.8.2
- old
+ new
@@ -1,5 +1,9 @@
+# Licensed to Elasticsearch B.V under one or more agreements.
+# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+# See the LICENSE file in the project root for more information
+
module Elasticsearch
module Transport
module Transport
module HTTP
@@ -14,11 +18,11 @@
# Performs the request by invoking {Transport::Base#perform_request} with a block.
#
# @return [Response]
# @see Transport::Base#perform_request
#
- def perform_request(method, path, params={}, body=nil, headers=nil)
+ def perform_request(method, path, params={}, body=nil, headers=nil, opts={})
super do |connection, url|
headers = headers || connection.connection.headers
response = connection.connection.run_request(method.downcase.to_sym,
url,
@@ -41,10 +45,10 @@
# Returns an array of implementation specific connection errors.
#
# @return [Array]
#
def host_unreachable_exceptions
- [::Faraday::Error::ConnectionFailed, ::Faraday::Error::TimeoutError]
+ [::Faraday::ConnectionFailed, ::Faraday::TimeoutError]
end
end
end
end
end