code: func (c *CredentialsClient) Ping(ctx context.Context, connectorName string) (*PingResponse, error) {
  	endpoint := c.clt.Endpoint("webapi", "ping")
  	if connectorName != "" {
  		endpoint = c.clt.Endpoint("webapi", "ping", connectorName)
  	}
  
  	response, err := c.clt.Get(ctx, endpoint, url.Values{})
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  
  	var pr *PingResponse
  	err = json.Unmarshal(response.Bytes(), &pr)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  
  	return pr, nil
  }
docs: // Ping serves two purposes. The first is to validate the HTTP endpoint of a
  // Teleport proxy. This leads to better user experience: users get connection
  // errors before being asked for passwords. The second is to return the form
  // of authentication that the server supports. This also leads to better user
  // experience: users only get prompted for the type of authentication the server supports.