vendor/bundle/ruby/2.7.0/gems/faraday-1.3.0/lib/faraday/connection.rb
# Build an absolute URL based on url_prefix.
#
# @param url [String, URI]
# @param params [Faraday::Utils::ParamsHash] A Faraday::Utils::ParamsHash to
#               replace the query values
#          of the resulting url (default: nil).
#
# @return [URI]
Build an absolute URL based on url_prefix.
Build an absolute URL based on url_prefix .
def build_exclusive_url(url = nil, params = nil, params_encoder = nil)
      url = nil if url.respond_to?(:empty?) && url.empty?
      base = url_prefix
      if url && base.path && base.path !~ %r{/$}
        base = base.dup
        base.path = "#{base.path}/" 
      end
      uri = url ? base + url : base
      if params
        uri.query = params.to_query(params_encoder || options.params_encoder)
      end
      uri.query = nil if uri.query && uri.query.empty?
      uri
    end
def build_exclusive_url ( url = nil , params = nil , params_encoder = nil ) url = nil if url . respond_to? ( :empty? ) && url . empty? base = url_prefix if url && base . path && base . path !~ %r{ /$ } base = base . dup base . path = "#{base.path}/" end uri = url ? base + url : base if params uri . query = params . to_query ( params_encoder || options . params_encoder ) end uri . query = nil if uri . query && uri . query . empty? uri end
Build an absolute URL based on url_prefix.
Build an absolute URL based on url_prefix .
# ensure trailing slash # rubocop:disable Style/SafeNavigation # rubocop:enable Style/SafeNavigation
None
URI
url
<not_specific>
params
A Faraday::Utils::ParamsHash to replace the query values of the resulting url (default: nil).
A Faraday :: Utils :: ParamsHash to replace the query values of the resulting url ( default : nil ) .
params_encoder
<not_specific>
<not_specific>
None