#pragma once #include "Config.h" #include #include #include #include #include #include #include class NetManager { public: void begin(const WiFiCred* creds, int count); bool checkConnection(); bool isConnected(); String getSSID(); String getIP(); int getRSSI(); bool syncNTP(); String getTimeStr(); bool dnsCheck(const char* host); bool tlsCheck(const char* host); /// HTTPS GET; writes body into `response`. Returns HTTP status code. int httpGet(const char* url, String& response); /// HTTPS POST with text/plain body. Returns HTTP status code. int httpPost(const char* url, const String& body); private: WiFiMulti _multi; WiFiUDP _udp; NTPClient* _ntp = nullptr; bool _ntpReady = false; };