diff --git a/CHANGELOG.md b/CHANGELOG.md index ff7d05678..049eff05c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,7 @@ * Batch requests with the service interface now inherit the service's connection * `register_discover_document` now returns the API instance * Added `:proxy` option to set Faraday's HTTP proxy setting -* Added `:faraday_options` option to allow passthrough settings to Faraday connection +* Added `:faraday_option` option to allow passthrough settings to Faraday connection * Drop 1.8.x support * This will be the last release with 1.9.x support diff --git a/lib/google/api_client.rb b/lib/google/api_client.rb index ef3c2b1d3..f1ab11ddc 100644 --- a/lib/google/api_client.rb +++ b/lib/google/api_client.rb @@ -82,7 +82,7 @@ module Google # @options options[Hash] :force_encoding # Experimental option. True if response body should be force encoded into the charset # specified in the Content-Type header. Mostly intended for compressed content. - # @options options[Hash] :faraday_options + # @options options[Hash] :faraday_option # Pass through of options to set on the Faraday connection def initialize(options={}) logger.debug { "#{self.class} - Initializing client with options #{options}" } diff --git a/lib/google/api_client/service.rb b/lib/google/api_client/service.rb index 28f2605d9..d80257a89 100755 --- a/lib/google/api_client/service.rb +++ b/lib/google/api_client/service.rb @@ -82,6 +82,8 @@ module Google # authenticated, `false` otherwise. # @option options [TrueClass, FalseClass] :gzip (default: true) # `true` if gzip enabled, `false` otherwise. + # @options options[Hash] :faraday_option + # Pass through of options to set on the Faraday connection # @option options [Faraday::Connection] :connection # A custom connection to be used for all requests. # @option options [ActiveSupport::Cache::Store, :default] :discovery_cache @@ -103,7 +105,7 @@ module Google params = {} [:application_name, :application_version, :authorization, :host, :port, :discovery_path, :auto_refresh_token, :key, :user_ip, - :ca_file].each do |option| + :ca_file, :faraday_option].each do |option| if options.include? option params[option] = options[option] end