@@ -244,12 +244,12 @@ func addOptions(s string, opt interface{}) (string, error) {
244244}
245245
246246// NewClient returns a new GitHub API client. If a nil httpClient is
247- // provided, http.DefaultClient will be used. To use API methods which require
247+ // provided, a new http.Client will be used. To use API methods which require
248248// authentication, provide an http.Client that will perform the authentication
249249// for you (such as that provided by the golang.org/x/oauth2 library).
250250func NewClient (httpClient * http.Client ) * Client {
251251 if httpClient == nil {
252- httpClient = http .DefaultClient
252+ httpClient = & http.Client {}
253253 }
254254 baseURL , _ := url .Parse (defaultBaseURL )
255255 uploadURL , _ := url .Parse (uploadBaseURL )
@@ -283,7 +283,7 @@ func NewClient(httpClient *http.Client) *Client {
283283// NewEnterpriseClient returns a new GitHub API client with provided
284284// base URL and upload URL (often the same URL).
285285// If either URL does not have a trailing slash, one is added automatically.
286- // If a nil httpClient is provided, http.DefaultClient will be used.
286+ // If a nil httpClient is provided, a new http.Client will be used.
287287//
288288// Note that NewEnterpriseClient is a convenience helper only;
289289// its behavior is equivalent to using NewClient, followed by setting
0 commit comments