Update to 3.10.3
This commit is contained in:
+5
-5
@@ -1887,7 +1887,7 @@ void setup(){
|
||||
}, onUpload);
|
||||
|
||||
// send a file when /index is requested
|
||||
server.on("/index", HTTP_ANY, [](AsyncWebServerRequest *request){
|
||||
server.on("/index", HTTP_ALL, [](AsyncWebServerRequest *request){
|
||||
request->send(SPIFFS, "/index.htm");
|
||||
});
|
||||
|
||||
@@ -1974,10 +1974,10 @@ public :
|
||||
|
||||
void begin(){
|
||||
// attach global request handler
|
||||
classWebServer.on("/example", HTTP_ANY, handleRequest);
|
||||
classWebServer.on("/example", HTTP_ALL, handleRequest);
|
||||
|
||||
// attach class request handler
|
||||
classWebServer.on("/example", HTTP_ANY, std::bind(&WebClass::classRequest, this, std::placeholders::_1));
|
||||
classWebServer.on("/example", HTTP_ALL, std::bind(&WebClass::classRequest, this, std::placeholders::_1));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1986,10 +1986,10 @@ WebClass webClassInstance;
|
||||
|
||||
void setup() {
|
||||
// attach global request handler
|
||||
globalWebServer.on("/example", HTTP_ANY, handleRequest);
|
||||
globalWebServer.on("/example", HTTP_ALL, handleRequest);
|
||||
|
||||
// attach class request handler
|
||||
globalWebServer.on("/example", HTTP_ANY, std::bind(&WebClass::classRequest, webClassInstance, std::placeholders::_1));
|
||||
globalWebServer.on("/example", HTTP_ALL, std::bind(&WebClass::classRequest, webClassInstance, std::placeholders::_1));
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
Reference in New Issue
Block a user