Skip to content

Commit 86514ae

Browse files
committed
fix: handle deprecation
1 parent d25a7e4 commit 86514ae

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ I often make small to medium-sized microcontroller solutions that run on ESP32 o
1010

1111
In order to be able to easily update OTA, it is important - from the users' point of view - that the update file **consists of one file**. I can't use the SPIFFS/LittleFS solution for this. It is necessary that the WebUI files are included inline in the Arduino or PlatformIO c++ code.
1212

13-
This npm package provides a solution for **inserting any JS client application into the ESP web server** (PsychicHttp and also ESPAsyncWebServer available, PsychicHttp is the default). For this, JS, html, css, font, assets, etc. files must be converted to binary byte array. Npm mode is easy to use and easy to **integrate into your CI/CD pipeline**.
13+
This npm package provides a solution for **inserting any JS client application into the ESP web server** (PsychicHttp and also ESPAsyncWebServer (https://github.com/ESP32Async/ESPAsyncWebServer) available, PsychicHttp is the default). For this, JS, html, css, font, assets, etc. files must be converted to binary byte array. Npm mode is easy to use and easy to **integrate into your CI/CD pipeline**.
1414

1515
> Starting with version v1.7.0, with the cachetime command line option, you can set whether the browser can cache pages
1616
@@ -154,7 +154,7 @@ void initSvelteStaticFiles(PsychicHttpServer * server) {
154154

155155
### Engines and ESP variants
156156

157-
ESPAsyncWebServer is a popular web server that can be used on **both ESP32 and ESP8266 microcontrollers**. When you want to generate a file for this, use the `-e async` switch.
157+
ESPAsyncWebServer (current location https://github.com/ESP32Async/ESPAsyncWebServer) is a popular web server. When you want to generate a file for this, use the `-e async` switch.
158158

159159
If you **only work on ESP32**, I recommend using PsychicHttpServer, which uses the native mode ESP-IDF web server inside. This way, its operation is significantly faster and more continuous. You can access this mode with the `-e psychic` switch.
160160

eslint.config.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export default [
6060
'unicorn/switch-case-braces': 'off',
6161
'unicorn/no-array-reduce': 'off',
6262
'unicorn/prefer-global-this': 'off',
63+
'unicorn/no-nested-ternary': 'off',
6364
'no-alert': 'error',
6465
'no-debugger': 'error'
6566
}

src/cppCode.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -524,22 +524,22 @@ void {{methodName}}(AsyncWebServer * server) {
524524
525525
{{#switch ../gzip}}
526526
{{#case "true"}}
527-
AsyncWebServerResponse *response = request->beginResponse_P(200, "{{this.mime}}", datagzip_{{this.dataname}}, {{this.lengthGzip}});
527+
AsyncWebServerResponse *response = request->beginResponse(200, "{{this.mime}}", datagzip_{{this.dataname}}, {{this.lengthGzip}});
528528
{{#if this.isGzip}}
529529
response->addHeader("Content-Encoding", "gzip");
530530
{{/if}}
531531
{{/case}}
532532
{{#case "false"}}
533-
AsyncWebServerResponse *response = request->beginResponse_P(200, "{{this.mime}}", data_{{this.dataname}}, {{this.length}});
533+
AsyncWebServerResponse *response = request->beginResponse(200, "{{this.mime}}", data_{{this.dataname}}, {{this.length}});
534534
{{/case}}
535535
{{#case "compiler"}}
536536
#ifdef {{../definePrefix}}_ENABLE_GZIP
537-
AsyncWebServerResponse *response = request->beginResponse_P(200, "{{this.mime}}", datagzip_{{this.dataname}}, {{this.lengthGzip}});
537+
AsyncWebServerResponse *response = request->beginResponse(200, "{{this.mime}}", datagzip_{{this.dataname}}, {{this.lengthGzip}});
538538
{{#if this.isGzip}}
539539
response->addHeader("Content-Encoding", "gzip");
540540
{{/if}}
541541
#else
542-
AsyncWebServerResponse *response = request->beginResponse_P(200, "{{this.mime}}", data_{{this.dataname}}, {{this.length}});
542+
AsyncWebServerResponse *response = request->beginResponse(200, "{{this.mime}}", data_{{this.dataname}}, {{this.length}});
543543
#endif
544544
{{/case}}
545545
{{/switch}}

0 commit comments

Comments
 (0)