Use default client rather than a new client instance.

This commit is contained in:
Burcu Dogan
2014-07-14 10:26:21 -07:00
parent 648dd50ab3
commit 6b4f2ed2ce
3 changed files with 3 additions and 4 deletions

View File

@@ -206,7 +206,7 @@ func (c *Config) exchange(exchangeCode string) (*Token, error) {
func (c *Config) updateToken(tok *Token, v url.Values) error {
v.Set("client_id", c.opts.ClientID)
v.Set("client_secret", c.opts.ClientSecret)
r, err := (&http.Client{}).PostForm(c.tokenURL, v)
r, err := http.DefaultClient.PostForm(c.tokenURL, v)
if err != nil {
return err
}