resharping writing data
This commit is contained in:
@@ -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);
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user