Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow a pre-configured resty client instance to be injected #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

benweint
Copy link

This change makes it possible for consumers of this module to take advantage of features of go-resty/resty that are currently inaccessible due to the fact that the resty.Client instance is inaccessible.

The specifi feature that I'm hoping to use is retry support, which requires clients wishing to opt-in to call the SetRetry* family of methods on the resty.Client instance. I'm also interested in using resty's middleware functionality.

@benweint
Copy link
Author

FWIW, I believe this would also provide a workable solution to the issue described in #22 - clients wishing to skip debug logging would just need to use the newly-introduced function allowing them to inject their own Client instance, and pass one without debug logging enabled.

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