-
Notifications
You must be signed in to change notification settings - Fork 321
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Initializing a Client
with a custom HTTP client always requires first creating a useless reqwest::Client
in Client::with_config
.
This adds a bit of useless overhead due to reqwest
's TLS/DNS functionality, which can be non-trivial for certain low-latency applications.
Would you be open to adding an additional method along the lines of?
impl<C: Config> Client<C> {
/// Create client with your own HTTP client, config, and backoff
pub fn build(http_client: reqwest::Client, config: C, backoff: backoff::ExponentialBackoff) -> Self {
Self {
http_client,
config,
backoff,
}
}
...
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers