ArduinoMongoose
ArduinoMongoose copied to clipboard
Multiple methods on same endpoint
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"); });