fn make_https_client() -> HttpsClient {
    let native_tls_connector = native_tls::TlsConnector::builder()
        .danger_accept_invalid_certs(true)
        .use_sni(false)
        .build()
        .expect("failed to build tls connector");
    let mut http_connector = HttpConnector::new();
    http_connector.enforce_http(false);
    let https_connector = HttpsConnector::from((http_connector, native_tls_connector.into()));
    Client::builder()
        .pool_idle_timeout(Some(Duration::from_secs(600)))
        .pool_max_idle_per_host(1)
        .build::<_, hyper::Body>(https_connector)
}
/// Setup HTTPS client which does not validate the self-signed certificate.
Setup HTTPS client which does not validate the self-signed certificate.
Setup HTTPS client which does not validate the self - signed certificate .
fn make_https_client() -> HttpsClient {
    let native_tls_connector = native_tls::TlsConnector::builder()
        .danger_accept_invalid_certs(true)
        .use_sni(false)
        .build()
        .expect("failed to build tls connector");
    let mut http_connector = HttpConnector::new();
    http_connector.enforce_http(false);
    let https_connector = HttpsConnector::from((http_connector, native_tls_connector.into()));
    Client::builder()
        .pool_idle_timeout(Some(Duration::from_secs(600)))
        .pool_max_idle_per_host(1)
        .build::<_, hyper::Body>(https_connector)
}
fn make_https_client ( ) -> HttpsClient { let native_tls_connector = native_tls :: TlsConnector :: builder ( ) . danger_accept_invalid_certs ( true ) . use_sni ( false ) . build ( ) . expect ( " " ) ; let mut http_connector = HttpConnector :: new ( ) ; http_connector . enforce_http ( false ) ; let https_connector = HttpsConnector :: from ( ( http_connector , native_tls_connector . into ( ) ) ) ; Client :: builder ( ) . pool_idle_timeout ( Some ( Duration :: from_secs ( 600 ) ) ) . pool_max_idle_per_host ( 1 ) . build :: < _ , hyper :: Body > ( https_connector ) }
Setup HTTPS client which does not validate the self-signed certificate.
Setup HTTPS client which does not validate the self - signed certificate .