code: def build_url_base(host, port, is_https):
      
      base = "http"
      if is_https:
          base += 's'
  
      base += "://"
      base += host
  
      if port:
          base += ":"
          base += str(port)
  
      return base
docs: Make base of url based on config