Template
1
0

resharping writing data

This commit is contained in:
2025-07-04 21:51:54 +03:00
parent 0d87542196
commit cc3eb54b3b
4 changed files with 16 additions and 10 deletions

View File

@@ -13,7 +13,11 @@ std::unordered_map<
void Webserver::initResponses() {
responseMethods["GET"]["/"] = [](HTTPrequest &self) {
self.writeData(Helpers::GenerateResponse(
"200 OK", "text/html", Helpers::ReadFile("www/index.html")));
self.sendResponse("200 OK", "text/html",
Helpers::ReadFile("www/index.html"));
};
responseMethods["POST"]["/upload"] = [](HTTPrequest &self) {
self.sendResponse("200 OK", "text/text", self.bodyContent);
};
}