~aleteoryx/lfm_embed

ref: 83ba4fe37a1184b998be09b9cbe53a22c7ba9e3b lfm_embed/src/http.rs -rw-r--r-- 283 bytes
83ba4fe3alyx Move caching to src/cache/; Finalize API parsing fixes 5 months ago
                                                                                
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)
}