cleanup http requests (part 1)

This commit is contained in:
MihailRis 2026-09-09 23:43:44 +03:00
parent 9a87c20823
commit 74bb695807
6 changed files with 73 additions and 143 deletions

View file

@ -68,22 +68,7 @@ namespace network {
Network(std::unique_ptr<Requests> requests);
~Network();
void get(
const std::string& url,
OnResponse onResponse,
OnReject onReject = nullptr,
std::vector<std::string> headers = {},
long maxSize=0
);
void post(
const std::string& url,
const std::string& fieldsData,
OnResponse onResponse,
OnReject onReject = nullptr,
std::vector<std::string> headers = {},
long maxSize=0
);
void request(HttpRequest request);
[[nodiscard]] Connection* getConnection(u64id_t id, bool includePrivate);
[[nodiscard]] Server* getServer(u64id_t id, bool includePrivate) const;