We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Any
use_preconfigured_tls
1 parent 08470a7 commit a24232cCopy full SHA for a24232c
src/https_helper.rs
@@ -1,5 +1,4 @@
1
use rustls::{pki_types::InvalidDnsNameError, ClientConfig};
2
-use std::sync::Arc;
3
use thiserror::Error;
4
5
pub use reqwest::Response;
@@ -22,14 +21,14 @@ impl From<Method> for reqwest::Method {
22
21
}
23
24
pub(crate) async fn https(
25
- client_config: &Arc<ClientConfig>,
+ client_config: &ClientConfig,
26
url: impl AsRef<str>,
27
method: Method,
28
body: Option<String>,
29
) -> Result<Response, HttpsRequestError> {
30
let method: reqwest::Method = method.into();
31
let client = reqwest::ClientBuilder::new()
32
- .use_preconfigured_tls(Arc::clone(client_config))
+ .use_preconfigured_tls(client_config.clone())
33
.build()?;
34
let mut request = client.request(method, url.as_ref());
35
if let Some(body) = body {
0 commit comments