diff --git a/src/connector.rs b/src/connector.rs index f8abe45..7fb7add 100644 --- a/src/connector.rs +++ b/src/connector.rs @@ -35,6 +35,23 @@ impl HttpsConnector { builder::ConnectorBuilder::new() } + /// Creates a new `HttpsConnector`. + /// + /// The recommended way to create a `HttpsConnector` is to use a [`crate::HttpsConnectorBuilder`]. See [`HttpsConnector::builder()`]. + pub fn new( + http: T, + tls_config: impl Into>, + force_https: bool, + server_name_resolver: Arc, + ) -> Self { + Self { + http, + tls_config: tls_config.into(), + force_https, + server_name_resolver, + } + } + /// Force the use of HTTPS when connecting. /// /// If a URL is not `https` when connecting, an error is returned.