From b28bfd6f208bc04b4157130eabfcf61b1825570d Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Sat, 23 Jan 2021 21:07:03 +0000 Subject: remove cpr as a dependency (#21) abstract away library usage --- filecache.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'filecache.hpp') diff --git a/filecache.hpp b/filecache.hpp index 0826fc0..0eacbbd 100644 --- a/filecache.hpp +++ b/filecache.hpp @@ -1,13 +1,12 @@ #pragma once -#include #include #include #include #include #include +#include #include "util.hpp" - -// todo throttle requests and keep track of active requests to stop redundant requests +#include "http.hpp" class Cache { public: @@ -23,7 +22,7 @@ private: std::string GetCachedName(std::string str); void CleanupFutures(); void RespondFromPath(std::filesystem::path path, callback_type cb); - void OnResponse(const cpr::Response &r); + void OnResponse(const http::response_type &r); std::unique_ptr m_semaphore; -- cgit v1.2.3