add network.post

This commit is contained in:
MihailRis
2025-01-08 17:02:07 +03:00
parent 5b6ad81eba
commit 96b904e61f
3 changed files with 91 additions and 10 deletions
+17
View File
@@ -23,6 +23,15 @@ namespace network {
OnReject onReject=nullptr,
long maxSize=0
) = 0;
virtual void post(
const std::string& url,
const std::string& data,
OnResponse onResponse,
OnReject onReject=nullptr,
long maxSize=0
) = 0;
virtual size_t getTotalUpload() const = 0;
virtual size_t getTotalDownload() const = 0;
@@ -84,6 +93,14 @@ namespace network {
long maxSize=0
);
void post(
const std::string& url,
const std::string& fieldsData,
OnResponse onResponse,
OnReject onReject = nullptr,
long maxSize=0
);
[[nodiscard]] Connection* getConnection(u64id_t id);
[[nodiscard]] TcpServer* getServer(u64id_t id) const;