-
Notifications
You must be signed in to change notification settings - Fork 50
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 using custom client #114
Conversation
@gsquire could you please review it? |
Hey, I'm currently on vacation so I won't get to this until next week. Sorry! |
src/v3.rs
Outdated
@@ -217,6 +217,17 @@ impl Sender { | |||
self.host = host.into(); | |||
} | |||
|
|||
/// Sets client to use for the API. This is useful if you want to customize the client. | |||
pub fn set_client(&mut self, client: Client) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be better to allow new
to accept an Option<Client>
and just unwrap it or use a default one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly. We'll need a new_blocking
function as well so users can configure that client. Otherwise this LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I will publish this as version 0.22.0 shortly. |
It would be useful to make it possible to use custom client. (to customize networking options)