leyline-http 0.1.5

HTTP client that impersonates Chrome, Firefox, and Safari on the wire: TLS (JA3/JA4), HTTP/2, and HTTP/3 fingerprints
Documentation
use leyline::pool::{DEFAULT_IDLE_TIMEOUT, DEFAULT_MAX_CONNECTIONS, Pool, PoolStats};
use std::time::Duration;

#[test]
fn empty_pool_stats_are_zero() {
    let pool = Pool::new();
    let s = pool.stats();
    let mut expected = PoolStats::default();
    expected.max_connections = DEFAULT_MAX_CONNECTIONS;
    assert_eq!(s, expected);
}

#[test]
fn with_limits_reflects_in_stats() {
    let pool = Pool::with_limits(Duration::from_secs(10), 4, 6);
    let s = pool.stats();
    assert_eq!(s.max_connections, 4);
    assert_eq!(s.entries, 0);
}

#[test]
fn default_constants_are_sane() {
    assert_eq!(DEFAULT_MAX_CONNECTIONS, 2048);
    assert_eq!(DEFAULT_IDLE_TIMEOUT, Duration::from_secs(300));
}