def __init__(self, sonarqube_url=None, username=None, password=None, token=None): self.base_url = strip_trailing_slash(sonarqube_url or self.DEFAULT_URL) _session = requests.Session() if token: _session.auth = (token, "") elif username and password: _session.auth = (username, password) self.session = _session
def __init__(self, sonarqube_url=None, username=None, password=None, token=None, verify=None, cert=None, timeout=None): self.base_url = strip_trailing_slash(sonarqube_url or self.DEFAULT_URL) _session = requests.Session() if token: _session.auth = (token, "") elif username and password: _session.auth = (username, password) if verify is not None: _session.verify = verify if cert is not None: _session.cert = cert self.session = _session self.timeout = timeout
def __init__(self, sonarcloud_url, token, timeout=None): self.base_url = strip_trailing_slash(sonarcloud_url) _session = requests.Session() _session.auth = (token, "") self.session = _session self.timeout = timeout
def __init__(self, sonarcloud_url, token): self.base_url = strip_trailing_slash(sonarcloud_url) _session = requests.Session() _session.auth = (token, '') self.session = _session