diff options
Diffstat (limited to 'src/discord/httpclient.hpp')
-rw-r--r-- | src/discord/httpclient.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/discord/httpclient.hpp b/src/discord/httpclient.hpp index 47b8a4d..841ce11 100644 --- a/src/discord/httpclient.hpp +++ b/src/discord/httpclient.hpp @@ -17,6 +17,8 @@ public: void SetUserAgent(std::string agent); void SetAuth(std::string auth); + void SetPersistentHeader(std::string name, std::string value); + void MakeDELETE(const std::string &path, const std::function<void(http::response_type r)> &cb); void MakeGET(const std::string &path, const std::function<void(http::response_type r)> &cb); void MakePATCH(const std::string &path, const std::string &payload, const std::function<void(http::response_type r)> &cb); @@ -24,6 +26,8 @@ public: void MakePUT(const std::string &path, const std::string &payload, const std::function<void(http::response_type r)> &cb); private: + void AddHeaders(http::request &r); + void OnResponse(const http::response_type &r, const std::function<void(http::response_type r)> &cb); void CleanupFutures(); @@ -36,4 +40,5 @@ private: std::string m_api_base; std::string m_authorization; std::string m_agent; + std::unordered_map<std::string, std::string> m_headers; }; |