diff options
| author | uku <[email protected]> | 2023-10-13 18:31:21 +0200 |
|---|---|---|
| committer | seth <[email protected]> | 2023-10-13 13:05:37 -0400 |
| commit | dec178a883769e221c8da3c125f83c6512b733e3 (patch) | |
| tree | 2c83398eea4375a12ba3e6583ec43ae3a6bf3070 /src/api/guzzle.rs | |
| parent | 05e0831f7926dd4afda8e72c6ea5aa7a466b6bea (diff) | |
move client & logic into api module
Diffstat (limited to 'src/api/guzzle.rs')
| -rw-r--r-- | src/api/guzzle.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/api/guzzle.rs b/src/api/guzzle.rs index b58f323..a13243d 100644 --- a/src/api/guzzle.rs +++ b/src/api/guzzle.rs @@ -1,4 +1,4 @@ -use once_cell::sync::Lazy; +use crate::api::REQWEST_CLIENT; use reqwest::StatusCode; use serde::{Deserialize, Serialize}; @@ -9,13 +9,6 @@ struct GuzzleResponse { const GUZZLE: &str = "https://api.mydadleft.me"; -pub static REQWEST_CLIENT: Lazy<reqwest::Client> = Lazy::new(|| { - reqwest::Client::builder() - .user_agent("teawieBot/0.1.0") - .build() - .unwrap_or_default() -}); - pub async fn get_random_teawie() -> String { let endpoint = "get_random_teawie"; let req = REQWEST_CLIENT |
