code: func newConn(host string, port int, poolsize int, timeout time.Duration, creds string) (*Conn, error) {
  	var tlsConfig *tls.Config
  	var err error
  
  	scheme := "http"
  
  	if creds != "" {
  		tlsConfig, err = newTLSClientConfig(creds)
  		if err != nil {
  			return nil, err
  		}
  
  		scheme = "https"
  	}
  
  	portstr := strconv.Itoa(port)
  	c := &Conn{
  		scheme:  scheme,
  		timeout: timeout,
  		host:    net.JoinHostPort(host, portstr),
  		transport: &http.Transport{
  			TLSClientConfig:       tlsConfig,
  			ResponseHeaderTimeout: timeout,
  			MaxIdleConnsPerHost:   poolsize,
  		},
  	}
  
  	// connectivity check so that we can bail out
  	// early instead of when we do the first operation.
  	_, _, err = c.doRPC("/rpc/void", nil)
  	if err != nil {
  		return nil, err
  	}
  
  	return c, nil
  }
docs: // KT has 2 interfaces, A restful one and an RPC one.
  // The RESTful interface is usually much faster than
  // the RPC one, but not all methods are implemented.
  // Use the RESTFUL interfaces when we can and fallback
  // to the RPC one when needed.
  //
  // The RPC format uses tab separated values with a choice of encoding
  // for each of the fields. We use base64 since it is always safe.
  //
  // REST format is just the body of the HTTP request being the value.