Skip to content

Conversation

@carbocation
Copy link

Adds an *http.Client to the main Client struct (and automatically defaults to http.DefaultClient if nil is provided). This permits the user to set important client attributes such as request timeouts (since the default is never to time out).

Requires API change from NewClient() to NewClient(nil) or NewClient(*http.Client).

Tests are updated and pass.

Adds an *http.Client to the main Client struct (and automatically
defaults to http.DefaultClient if nil is provided). This permits
the user to set important client attributes such as request
timeouts (since the default is never to time out).

Requires API change from NewClient() to NewClient(nil) or
NewClient(*http.Client).

Tests are updated and pass.
@carbocation
Copy link
Author

Would be happy to modify this to keep NewClient() intact and to create an alternative initializer to prevent this change from breaking old apps. Let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant