use wreq_util::{Emulation, Platform, Profile};
#[tokio::main]
async fn main() -> Result<(), wreq::Error> {
let text = wreq::get("https://tls.browserleaks.com/")
.emulation(Emulation::Safari26)
.send()
.await?
.text()
.await?;
println!("{}\n", text);
let text = wreq::get("https://tls.peet.ws/api/all")
.emulation(
Emulation::builder()
.profile(Profile::OkHttp5)
.platform(Platform::Windows)
.http2(false)
.build(),
)
.send()
.await?
.text()
.await?;
println!("{}\n", text);
let text = wreq::get("https://tls.peet.ws/api/all")
.emulation(Emulation::random())
.send()
.await?
.text()
.await?;
println!("{}", text);
Ok(())
}