ArduinoMongoose icon indicating copy to clipboard operation
ArduinoMongoose copied to clipboard

Multiple methods on same endpoint

Open jorgenhojdmo opened this issue 2 years ago • 0 comments
trafficstars

If I set up multiple methods on the same endpoint, only the last will be executed, despite if I call the endpoint with a POST or GET

server.on("/tst$", HTTP_GET, [](MongooseHttpServerRequest *request)
              {
                Serial.printf("GET Method: %d\r\n",request->method());
                request->send(200, "text/plain", "tst: get"); });

server.on("/tst$", HTTP_POST, [](MongooseHttpServerRequest *request)
              {
                Serial.printf("POST Method: %d\r\n",request->method());
                request->send(200, "text/plain", "tst: post"); });

jorgenhojdmo avatar Nov 17 '23 13:11 jorgenhojdmo