aboutsummaryrefslogblamecommitdiffstats
path: root/src/http.rs
blob: f0a609b547717db7b698a665b4bce61c48c1e866 (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                                                                                                 
use std::sync::LazyLock;
use reqwest::Client;

pub(crate) fn new() -> Client {
  Client::builder().https_only(true).user_agent(concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION"))).build().unwrap()
}
pub(crate) const fn lazy() -> LazyLock<Client> {
  LazyLock::new(new)
}