class Faraday::ConnectionOptions

ConnectionOptions contains the configurable properties for a Faraday connection object.

The request, ssl and proxy values are coerced by {.from}, {#update} and {#merge}. false means “not set” for these members, like the legacy Struct did: {.from}, {#update} and {#merge} skip it and keep the current value. The writers keep the assigned value as it is.

The request, ssl and builder_class readers assign a default when no value is set, so {#to_hash} always includes them.

Constants

COERCIONS
MEMBERS

Attributes

@return [RackBuilder] the middleware stack builder for the connection

@return [Hash] default headers for the connection

@return [Object] manager used when the connection runs in parallel mode

@return [Hash] default query parameters for the connection

@return [ProxyOptions, nil] proxy options for the connection

@return [String, URI] the base URL for the connection

Public Instance Methods

@return [Class] the class used to build the middleware stack.

{RackBuilder} is assigned when none is set.
# File lib/faraday/options/connection_options.rb, line 59
def builder_class
  @builder_class ||= RackBuilder
end

Builds a new middleware stack with {#builder_class}.

@param block [Proc, nil] the block passed to the builder @return [RackBuilder]

# File lib/faraday/options/connection_options.rb, line 67
def new_builder(block)
  builder_class.new(&block)
end

@return [RequestOptions] default request options for the connection.

A new instance is assigned when none is set.
# File lib/faraday/options/connection_options.rb, line 47
def request
  @request ||= RequestOptions.new
end

@return [SSLOptions] SSL options for the connection.

A new instance is assigned when none is set.
# File lib/faraday/options/connection_options.rb, line 53
def ssl
  @ssl ||= SSLOptions.new
end