use std::error::Error;
use ureq::tls::TlsConfig;
use ureq::{Agent, Proxy, config::Config};
fn main() -> Result<(), Box<dyn Error>> {
let proxy = Proxy::new("http://localhost:8080")?;
let config = Config::builder()
.tls_config(
TlsConfig::builder()
.disable_verification(true)
.build(),
)
.proxy(Some(proxy))
.build();
let agent = Agent::new_with_config(config);
let _ = agent.get("https://example.com").call()?;
Ok(())
}