WebServer::onNotFound()

名称

WebServer::onNotFound()

説明

WebServer::on()によって登録していないURIにアクセスがあった時に呼び出す関数を登録する。いわゆる404ページを登録するための関数です。

書式

#include <WebServer.h>

void WebServer::onNotFound(THandlerFunction fn);

引数

fn 呼び出す関数。

THandlerFunctionは以下のように定義されている。

typedef std::function<void(void)> THandlerFunction;

戻り値

なし。

使用例

バージョン

Hardware:ESP-WROOM-32
Software:Arduino core for the ESP32 2.0.4

最終更新日

September 4, 2022

inserted by FC2 system