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 aff7441 commit fc93c58Copy full SHA for fc93c58
src/connector.rs
@@ -35,6 +35,23 @@ impl<T> HttpsConnector<T> {
35
builder::ConnectorBuilder::new()
36
}
37
38
+ /// Creates a new `HttpsConnector`.
39
+ ///
40
+ /// The recommended way to create a `HttpsConnector` is to use a [`crate::HttpsConnectorBuilder`]. See [`HttpsConnector::builder()`].
41
+ pub fn new(
42
+ http: T,
43
+ tls_config: impl Into<Arc<rustls::ClientConfig>>,
44
+ force_https: bool,
45
+ server_name_resolver: Arc<dyn ResolveServerName + Send + Sync>,
46
+ ) -> Self {
47
+ Self {
48
+ http,
49
+ tls_config: tls_config.into(),
50
+ force_https,
51
+ server_name_resolver,
52
+ }
53
54
+
55
/// Force the use of HTTPS when connecting.
56
///
57
/// If a URL is not `https` when connecting, an error is returned.
0 commit comments