builder/digitalocean: use HTTP proxy if in env

This commit is contained in:
Mitchell Hashimoto
2013-08-18 20:29:54 -06:00
parent 9bf7d7b81b
commit 513e4a2a3a
+5 -1
View File
@@ -43,7 +43,11 @@ type DigitalOceanClient struct {
// Creates a new client for communicating with DO
func (d DigitalOceanClient) New(client string, key string) *DigitalOceanClient {
c := &DigitalOceanClient{
client: http.DefaultClient,
client: &http.Client{
Transport: &http.Transport{
Proxy: http.ProxyFromEnvironment,
},
},
BaseURL: DIGITALOCEAN_API_URL,
ClientID: client,
APIKey: key,