aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/clients/httpclientcommon.h
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-10-17 11:36:49 +0200
committerGitHub Enterprise <[email protected]>2025-10-17 11:36:49 +0200
commit2e99697d4922f37e9304ec360602fed71c8a306e (patch)
tree5a0d241ae483ae870a8f4e7b7b548e11fc9f0c1d /src/zenhttp/clients/httpclientcommon.h
parentexclude .sym and .psym (#585) (diff)
downloadzen-2e99697d4922f37e9304ec360602fed71c8a306e.tar.xz
zen-2e99697d4922f37e9304ec360602fed71c8a306e.zip
add ability to abort http requests (#586)
* add abort-check function to httpclient
Diffstat (limited to 'src/zenhttp/clients/httpclientcommon.h')
-rw-r--r--src/zenhttp/clients/httpclientcommon.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/zenhttp/clients/httpclientcommon.h b/src/zenhttp/clients/httpclientcommon.h
index 9060cde48..1d0b7f9ea 100644
--- a/src/zenhttp/clients/httpclientcommon.h
+++ b/src/zenhttp/clients/httpclientcommon.h
@@ -14,7 +14,7 @@ using namespace std::literals;
class HttpClientBase
{
public:
- HttpClientBase(std::string_view BaseUri, const HttpClientSettings& Connectionsettings = {});
+ HttpClientBase(std::string_view BaseUri, const HttpClientSettings& Connectionsettings, std::function<bool()>&& CheckIfAbortFunction);
virtual ~HttpClientBase() = 0;
using Response = HttpClient::Response;
@@ -64,6 +64,7 @@ protected:
std::string m_BaseUri;
std::string m_SessionId;
const HttpClientSettings m_ConnectionSettings;
+ std::function<bool()> m_CheckIfAbortFunction;
const std::optional<HttpClientAccessToken> GetAccessToken();