packer-cn/helper/common/default_client.go

15 lines
218 B
Go

package common
import (
"net/http"
)
func HttpClientWithEnvironmentProxy() *http.Client {
httpClient := &http.Client{
Transport: &http.Transport{
Proxy: http.ProxyFromEnvironment,
},
}
return httpClient
}