mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-07 01:26:43 +00:00
19 lines
396 B
Go
19 lines
396 B
Go
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
|
|
}
|