aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/terraform/httpclient/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/httpclient/client.go')
-rw-r--r--vendor/github.com/hashicorp/terraform/httpclient/client.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/httpclient/client.go b/vendor/github.com/hashicorp/terraform/httpclient/client.go
new file mode 100644
index 0000000..bb06beb
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform/httpclient/client.go
@@ -0,0 +1,18 @@
1package httpclient
2
3import (
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.
11func New() *http.Client {
12 cli := cleanhttp.DefaultPooledClient()
13 cli.Transport = &userAgentRoundTripper{
14 userAgent: UserAgentString(),
15 inner: cli.Transport,
16 }
17 return cli
18}