#pragma once #include #include #include #include class ESPMegaWebServer { public: ESPMegaWebServer(uint16_t port); ~ESPMegaWebServer(); void begin(ESPMegaIoT *iot); void loop(); private: // Web Server AsyncWebServer server; uint16_t port; // ESPMegaIoT ESPMegaIoT *iot; // Endpoints Handlers void dashboardHandler(AsyncWebServerRequest *request); void configHandler(AsyncWebServerRequest *request); void saveConfigHandler(AsyncWebServerRequest *request); void otaHandler(AsyncWebServerRequest *request); void restAPIHandler(AsyncWebServerRequest *request); };