Skip to content

Commit

Permalink
ESP Async WebServer v3 (breaking changes in v3)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieucarbou committed Jun 27, 2024
1 parent b451846 commit 4e90b1e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/esphome-ESPAsyncTCP#v2.0.0

- name: Install ESPAsyncWebServer
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/ESPAsyncWebServer#v2.10.4
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/ESPAsyncWebServer#v3.0.2

- name: Build Demo
run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Demo/Demo.ino"
Expand All @@ -93,31 +93,31 @@ jobs:
- name: esp32dev|arduino
board: esp32dev
platform: espressif32
opts:
opts: "--project-option 'lib_compat_mode = strict'"
- name: esp32dev|arduino-2
board: esp32dev
platform: [email protected]
opts:
opts: "--project-option 'lib_compat_mode = strict'"
- name: esp32dev|arduino-3
board: esp32dev
platform: espressif32
opts: "--project-option 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.1, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.1/esp32-arduino-libs-3.0.1.zip'"
opts: "--project-option 'lib_compat_mode = strict' --project-option 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.1, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.1/esp32-arduino-libs-3.0.1.zip'"
- name: esp32-s3-devkitc-1|arduino
board: esp32-s3-devkitc-1
platform: espressif32
opts:
opts: "--project-option 'lib_compat_mode = strict'"
- name: esp32-s3-devkitc-1|arduino-2
board: esp32-s3-devkitc-1
platform: [email protected]
opts:
opts: "--project-option 'lib_compat_mode = strict'"
- name: esp32-s3-devkitc-1|arduino-3
board: esp32-s3-devkitc-1
platform: espressif32
opts: "--project-option 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.1, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.1/esp32-arduino-libs-3.0.1.zip'"
opts: "--project-option 'lib_compat_mode = strict' --project-option 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.1, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.1/esp32-arduino-libs-3.0.1.zip'"
- name: huzzah|espressif8266
board: huzzah
platform: espressif8266
opts:
opts: "--project-option 'lib_compat_mode = strict'"
steps:
- uses: actions/checkout@v4
- name: Set up cache
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{
"owner": "mathieucarbou",
"name": "ESP Async WebServer",
"version": "^2.10.4",
"version": "^3.0.2",
"platforms": ["espressif8266", "espressif32"]
}
],
Expand Down
4 changes: 2 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build_flags =
-D ELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
mathieucarbou/Async TCP @ ^3.1.4
mathieucarbou/ESP Async WebServer @ 2.10.4
mathieucarbou/ESP Async WebServer @ 3.0.2
upload_protocol = esptool
monitor_speed = 115200
monitor_filters = esp32_exception_decoder, log2file
Expand Down Expand Up @@ -36,7 +36,7 @@ board = esp32-s3-devkitc-1
platform = espressif8266
board = huzzah
lib_deps =
mathieucarbou/ESP Async WebServer @ 2.10.4
mathieucarbou/ESP Async WebServer @ 3.0.2
esphome/ESPAsyncTCP-esphome @ 2.0.0

[env:pico]
Expand Down
2 changes: 1 addition & 1 deletion src/ElegantOTA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void ElegantOTAClass::begin(ELEGANTOTA_WEBSERVER *server, const char * username,
if(_authenticate && !request->authenticate(_username.c_str(), _password.c_str())){
return request->requestAuthentication();
}
AsyncWebServerResponse *response = request->beginResponse_P(200, "text/html", ELEGANT_HTML, sizeof(ELEGANT_HTML));
AsyncWebServerResponse *response = request->beginResponse(200, "text/html", ELEGANT_HTML, sizeof(ELEGANT_HTML));
response->addHeader("Content-Encoding", "gzip");
request->send(response);
});
Expand Down

0 comments on commit 4e90b1e

Please sign in to comment.