class Faraday::Connection

def with_uri_credentials(uri)

Internal: Yields username and password extracted from a URI if they both exist.
def with_uri_credentials(uri)
  if uri.user and uri.password
    yield(Utils.unescape(uri.user), Utils.unescape(uri.password))
  end
end