code: func NewHttpClient(transport *http.Transport, tlsConf TLSConfig) (*http.Client, error) {
  	client := &http.Client{
  		Transport: transport,
  	}
  
  	// TODO (slackpad) - Once we get some run time on the HTTP/2 support we
  	// should turn it on by default if TLS is enabled. We would basically
  	// just need to call http2.ConfigureTransport(transport) here. We also
  	// don't want to introduce another external dependency on
  	// golang.org/x/net/http2 at this time. For a complete recipe for how
  	// to enable HTTP/2 support on a transport suitable for the API client
  	// library see agent/http_test.go:TestHTTPServer_H2.
  
  	if transport.TLSClientConfig == nil {
  		tlsClientConfig, err := SetupTLSConfig(&tlsConf)
  
  		if err != nil {
  			return nil, err
  		}
  
  		transport.TLSClientConfig = tlsClientConfig
  	}
  
  	return client, nil
  }
docs: // NewHttpClient returns an http client configured with the given Transport and TLS
  // config.