Fixes #614 with incorrect regex in the example sketch (#615)

This commit is contained in:
frippe75 2019-10-06 10:08:59 +02:00 committed by Me No Dev
parent 83f6b96958
commit 6a1fb03fc4
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ void setup() {
});
// Send a GET request to <IP>/sensor/<number>/action/<action>
server.on("^\\/sensor\\/([0-9]+)\\/action\//([a-zA-Z0-9]+)$", HTTP_GET, [] (AsyncWebServerRequest *request) {
server.on("^\\/sensor\\/([0-9]+)\\/action\\/([a-zA-Z0-9]+)$", HTTP_GET, [] (AsyncWebServerRequest *request) {
String sensorNumber = request->pathArg(0);
String action = request->pathArg(1);
request->send(200, "text/plain", "Hello, sensor: " + sensorNumber + ", with action: " + action);