def get_base_url(use_ssl, instance=None, host=None):
        """Formats the base URL either `host` or `instance`

        :return: Base URL string
        """

        if instance is not None:
            host = ("%s.service-now.com" % instance).rstrip('/')

        if use_ssl is True:
            return "https://%s" % host

        return "http://%s" % host