From 32fc7def7c5936e9a4c8c4d9b36b9a7570ca8664 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Wed, 17 Aug 2022 01:42:30 -0400 Subject: fetch cookies and build number on startup --- src/discord/httpclient.cpp | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) (limited to 'src/discord/httpclient.cpp') diff --git a/src/discord/httpclient.cpp b/src/discord/httpclient.cpp index d13246d..cc0bb93 100644 --- a/src/discord/httpclient.cpp +++ b/src/discord/httpclient.cpp @@ -2,7 +2,6 @@ #include -//#define USE_LOCAL_PROXY HTTPClient::HTTPClient() { m_dispatcher.connect(sigc::mem_fun(*this, &HTTPClient::RunCallbacks)); } @@ -23,6 +22,10 @@ void HTTPClient::SetPersistentHeader(std::string name, std::string value) { m_headers.insert_or_assign(std::move(name), std::move(value)); } +void HTTPClient::SetCookie(std::string_view cookie) { + m_cookie = cookie; +} + void HTTPClient::MakeDELETE(const std::string &path, const std::function &cb) { printf("DELETE %s\n", path.c_str()); m_futures.push_back(std::async(std::launch::async, [this, path, cb] { @@ -31,10 +34,6 @@ void HTTPClient::MakeDELETE(const std::string &path, const std::function