From 62c97ef9b5d4bfe134366954ebc28a5ba2a6079b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9B=E5=BC=BA?= Date: Sat, 15 Aug 2020 23:15:39 +0800 Subject: [PATCH] use TwitterApi.HttpClient instead using a common TwitterApi.HttpClient especially When you had changed the default http.Client.Transport. --- twitter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twitter.go b/twitter.go index 069d581..ecb8093 100644 --- a/twitter.go +++ b/twitter.go @@ -189,7 +189,7 @@ func (c *TwitterApi) SetBaseUrl(baseUrl string) { //Redirect the user to this URL. //This assumes that the consumer key has already been set (using SetConsumerKey or NewTwitterApiWithCredentials). func (c *TwitterApi) AuthorizationURL(callback string) (string, *oauth.Credentials, error) { - tempCred, err := c.oauthClient.RequestTemporaryCredentials(http.DefaultClient, callback, nil) + tempCred, err := c.oauthClient.RequestTemporaryCredentials(c.HttpClient, callback, nil) if err != nil { return "", nil, err }