1 2 3 4 5 6 7
use std::sync::OnceLock; static HTTP_CLIENT: OnceLock<reqwest::Client> = OnceLock::new(); pub(crate) fn http_client() -> &'static reqwest::Client { HTTP_CLIENT.get_or_init(reqwest::Client::new) }