def connection
      raise ConfigurationError.new "Site is required" unless site

      @connection ||= Faraday.new(site) do |builder|
        if login || password
          builder.use Faraday::Request::BasicAuthentication, login, password
        end

        connection_builder.call(builder)
      end
    end
def connection
      raise ConfigurationError.new "Site is required" unless site

      @connection ||= Faraday.new(site) do |builder|
        if login || password
          builder.use Faraday::Request::BasicAuthentication, login, password
        end

        connection_builder.call(builder)
      end
    end
Provide login and password fields for basic HTTP authentication
 Provide request_default_options field for default options to be provided on each http request
 To set a default User-agent which identifies your application, provide
 { request_default_options: { header: { user_agent: 'My great new App V.0.1   Contact: me@me.com'} } }