cleanup - i leave chunked in system/output/add for now, document will get bit bigger i geuss
This commit is contained in:
parent
bba1687022
commit
55997e82eb
1 changed files with 0 additions and 26 deletions
|
@ -397,38 +397,12 @@ String Proc_WebPage_system_output_add_POST(const String& var) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/mathieucarbou/ESPAsyncWebServer?tab=readme-ov-file#chunked-response-containing-templates
|
|
||||||
//auto Chunk_system_output_add_HTML(uint8_t *buffer, size_t maxLen, size_t alreadySent) -> size_t {
|
|
||||||
//Write up to "maxLen" bytes into "buffer" and return the amount written.
|
|
||||||
//index equals the amount of bytes that have been already sent
|
|
||||||
//You will be asked for more data until 0 is returned
|
|
||||||
//Keep in mind that you can not delay or yield waiting for more data!
|
|
||||||
|
|
||||||
// https://forum.arduino.cc/t/espasyncwebserver-replay-page-size/1049106/19
|
|
||||||
//const int len_html = sizeof(Page_system_output_add_HTML)/sizeof(Page_system_output_add_HTML[0]);
|
|
||||||
//size_t len = min(maxLen, len_html - index);
|
|
||||||
//Serial.printf("Sending %u bytes\n", len);
|
|
||||||
//memcpy(buffer, Page_system_output_add_HTML + index, len);
|
|
||||||
//return len;
|
|
||||||
//const size_t size = sizeof Page_system_output_add_HTML;
|
|
||||||
//if (size - alreadySent >= maxLen) {
|
|
||||||
//memcpy(buffer, Page_system_output_add_HTML + alreadySent, maxLen);
|
|
||||||
//return maxLen;
|
|
||||||
//} else { // last chunk and then 0
|
|
||||||
//memcpy(buffer, Page_system_output_add_HTML + alreadySent, size - alreadySent);
|
|
||||||
//return size - alreadySent;
|
|
||||||
//}
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void WebPage_system_output_add(AsyncWebServerRequest *request) {
|
void WebPage_system_output_add(AsyncWebServerRequest *request) {
|
||||||
if(request->method() == HTTP_POST) {
|
if(request->method() == HTTP_POST) {
|
||||||
|
|
||||||
Serial.println(":: [Webserver:system:output:add] [POST] hello");
|
Serial.println(":: [Webserver:system:output:add] [POST] hello");
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// https://github.com/mathieucarbou/ESPAsyncWebServer?tab=readme-ov-file#chunked-response-containing-templates
|
// https://github.com/mathieucarbou/ESPAsyncWebServer?tab=readme-ov-file#chunked-response-containing-templates
|
||||||
//Write up to "maxLen" bytes into "buffer" and return the amount written.
|
//Write up to "maxLen" bytes into "buffer" and return the amount written.
|
||||||
|
|
Loading…
Reference in a new issue