builder/digitalocean: use HTTP proxy if in env

This commit is contained in:
Mitchell Hashimoto 2013-08-18 20:29:54 -06:00
parent 8bbed8656a
commit 45f3ca13cb
1 changed files with 5 additions and 1 deletions

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,