I'm not exactly new to C++ but this is the first time I've stumbled accross a notation that goes like this:
/*handling uploading firmware file */
server.on("/update", HTTP_POST, []() {
server.sendHeader("Connection", "close");
server.send(200, "text/plain", (Update.hasError()) ? "FAIL" : "OK");
ESP.restart();
},
[parameter list goes on..]
Explanation: This code is built for an esp32 microcontroller. The particular code snipplet deals with listening to HTTP_POST requests, which will be pushing an "update" button on a served web page. A library "Update.h" is used in which a class "Update" is instantiated.
But I'm now confused about the {} parameter thingy. What is this? I've never come accross this and don't know what i should make of it..?