pub fn new() -> Result<Self, TlsError> {
        #[cfg(feature = "native-tls")]
        let connector = match HttpsConnector::new(4) {
            Ok(connector) => connector,
            Err(tls_error) => {
                return Err(TlsError {
                    message: format!("Couldn't create NativeTlsClient: {}", tls_error),
                })
            }
        };

        #[cfg(feature = "rustls")]
        let connector = HttpsConnector::new(4);

        Ok(Self::from_connector(connector))
    }
/// Create a tls-enabled http client.
Create a tls-enabled http client.
Create a tls - enabled http client .
pub fn new() -> Result<Self, TlsError> {
        #[cfg(feature = "native-tls")]
        let connector = match HttpsConnector::new(4) {
            Ok(connector) => connector,
            Err(tls_error) => {
                return Err(TlsError {
                    message: format!("Couldn't create NativeTlsClient: {}", tls_error),
                })
            }
        };
        #[cfg(feature = "rustls")]
        let connector = HttpsConnector::new(4);
        Ok(Self::from_connector(connector))
    }
pub fn new ( ) -> Result < Self , TlsError > { # [ cfg ( feature " " ) ] let connector = match HttpsConnector :: new ( 4 ) { Ok ( connector ) => connector , Err ( tls_error ) => { return Err ( TlsError { message : format ! ( " " tls_error ) , } ) } } ; # [ cfg ( feature " " ) ] let connector = HttpsConnector :: new ( 4 ) ; Ok ( Self :: from_connector ( connector ) ) }
Create a tls-enabled http client.
Create a tls - enabled http client .