We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc5ee28 commit dca28e3Copy full SHA for dca28e3
src/isahc.rs
@@ -21,8 +21,13 @@ impl Default for IsahcClient {
21
impl IsahcClient {
22
/// Create a new instance.
23
pub fn new() -> Self {
24
+ Self::from_client(isahc::HttpClient::new().unwrap())
25
+ }
26
+
27
+ /// Create from externally initialized and configured client.
28
+ pub fn from_client(client: isahc::HttpClient) -> Self {
29
Self {
- client: Arc::new(isahc::HttpClient::new().unwrap()),
30
+ client: Arc::new(client),
31
}
32
33
0 commit comments