diff --git a/src/trs/trs.hpp b/src/trs/trs.hpp index c438e6f..e1a5533 100644 --- a/src/trs/trs.hpp +++ b/src/trs/trs.hpp @@ -137,6 +137,18 @@ namespace trs return m_cli.Post("/", headers, data.dump(),"application/json" ); } + auto post(std::string func_name, JSON& data) + { + httplib::Headers headers = { + { "TRS-server-token", m_token }, + { "TRS-server-function", func_name }, + { "Content-Type", "application/json" }, + { "Cookie", "unione_lang=ru" } + }; + + return m_cli.Post("/", headers, data.dump(),"application/json" ); + } + private: httplib::Client m_cli; std::string m_token;