Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
:client_cert => @config.ssl_client_cert,
:client_key => @config.ssl_client_key
}
request_options = {
:params_encoder => @config.params_encoder
}
connection = Faraday.new(:url => config.base_url, :ssl => ssl_options, :request => request_options) do |conn|
connection = Faraday.new(:url => config.base_url, :ssl => ssl_options) do |conn|
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dkliban It seems the params_encoder option is configured again so I think we can remove it from here but let me know if my understanding is not correct.

# Overload default options only if provided
request.options.params_encoder = @config.params_encoder if @config.params_encoder

if config.username && config.password
if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0')
conn.request(:authorization, :basic, config.username, config.password)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ def call_api(http_method, path, opts = {})
:client_cert => @config.ssl_client_cert,
:client_key => @config.ssl_client_key
}
request_options = {
:params_encoder => @config.params_encoder
}
connection = Faraday.new(:url => config.base_url, :ssl => ssl_options, :request => request_options) do |conn|
connection = Faraday.new(:url => config.base_url, :ssl => ssl_options) do |conn|
if config.username && config.password
if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0')
conn.request(:authorization, :basic, config.username, config.password)
Expand Down