github.com/jaredpalmer/terraform@v1.1.0-alpha20210908.0.20210911170307-88705c943a03/internal/httpclient/client.go (about) 1 package httpclient 2 3 import ( 4 "net/http" 5 6 cleanhttp "github.com/hashicorp/go-cleanhttp" 7 ) 8 9 // New returns the DefaultPooledClient from the cleanhttp 10 // package that will also send a Terraform User-Agent string. 11 func New() *http.Client { 12 cli := cleanhttp.DefaultPooledClient() 13 cli.Transport = &userAgentRoundTripper{ 14 userAgent: UserAgentString(), 15 inner: cli.Transport, 16 } 17 return cli 18 }