code: func (c *Client) discoRoot() string {
  	s := c.server
  	if c.sameOrigin {
  		s = strings.TrimPrefix(s, "http://")
  		s = strings.TrimPrefix(s, "https://")
  		parts := strings.SplitN(s, "/", 1)
  		if len(parts) < 2 {
  			return "/"
  		}
  		return "/" + parts[1]
  	}
  	if !strings.HasPrefix(s, "http") {
  		s = "https://" + s
  	}
  	return s
  }
docs: // discoRoot returns the user defined server for this client. It prepends "https://" if no scheme was specified.