blob: bb06beb470f234d32d691808ed947dc2c49b5e24 [file] [log] [blame]
package httpclient
import (
"net/http"
cleanhttp "github.com/hashicorp/go-cleanhttp"
)
// New returns the DefaultPooledClient from the cleanhttp
// package that will also send a Terraform User-Agent string.
func New() *http.Client {
cli := cleanhttp.DefaultPooledClient()
cli.Transport = &userAgentRoundTripper{
userAgent: UserAgentString(),
inner: cli.Transport,
}
return cli
}