hpx-emulation 2.4.8

Browser emulation profiles for hpx (TLS fingerprinting, HTTP/2 settings)
Documentation
use hpx::Client;
use hpx_emulation::Emulation;

#[tokio::main]
async fn main() -> Result<(), hpx::Error> {
    // Build a client to emulation random devices
    let client = Client::builder()
        .emulation(Emulation::random())
        .cert_verification(false)
        .build()?;

    // Use the API you're already familiar with
    let text = client
        .get("https://tls.peet.ws/api/all")
        .send()
        .await?
        .text()
        .await?;

    println!("{}", text);

    Ok(())
}