update webserver html,js,css

This commit is contained in:
2021-07-05 18:15:57 +02:00
parent f62a18fe66
commit 2754bd5247
5 changed files with 117 additions and 88 deletions
+14 -1
View File
@@ -58,11 +58,24 @@ void HTTPServer::logt(const char *format, ...) {
void HTTPServer::start_apps() {
// application handler
this->on("/app=terminal", HTTP_POST, [this]() {
this->on("/update", HTTP_POST, [this]() {
// Serial.printf("got /update with args()=%d\n", args());
for(int i=0; i<args(); i++) {
Serial.printf("%s=%s\n", argName(i).c_str(), arg(i).c_str());
}
send(200, "text/plain", "accepted");
});
this->on("/terminal", HTTP_POST, [this]() {
// Serial.printf("got /terminal\n");
if(tbuf_head) {
send(200, "text/plain", tbuf);
tbuf_head = 0;
}
else {
send(202, "text/plain", "");
}
});
}