diff --git a/simple_web/explanation.md b/simple_web/explanation.md index fc34052..0ab150f 100644 --- a/simple_web/explanation.md +++ b/simple_web/explanation.md @@ -5,6 +5,13 @@ AsyncWebServer server(80); ``` Start the Web Server on port 80 +``` +void notFound(AsyncWebServerRequest *request) { + request->send(404, "text/plain", "Not found"); +} +``` +This will handle requests on wrong uri's with this code `server.onNotFound(notFound);` + ``` WiFi.begin(ssid, password); if (WiFi.waitForConnectResult() != WL_CONNECTED) {