diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index f272a63..3aee6c3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -92,7 +92,7 @@ async fn main() { let jobset: Arc<Mutex<JoinSet<()>>> = Default::default(); let session_store: kittybox::SessionStore = Default::default(); - let http: reqwest::Client = { + let http: reqwest_middleware::ClientWithMiddleware = { #[allow(unused_mut)] let mut builder = reqwest::Client::builder() .user_agent(concat!( @@ -137,7 +137,13 @@ async fn main() { builder = builder.danger_accept_invalid_certs(true); } - builder.build().unwrap() + reqwest_middleware::ClientBuilder::new(builder.build().unwrap()) + .with(http_cache_reqwest::Cache(http_cache_reqwest::HttpCache { + mode: http_cache_reqwest::CacheMode::Default, + manager: http_cache_reqwest::MokaManager::default(), + options: http_cache_reqwest::HttpCacheOptions::default(), + })) + .build() }; let backend_type = backend_uri.scheme(); |