if guard uri for esp8266

This commit is contained in:
samuelbles07
2024-11-30 04:45:04 +07:00
parent aeee0cad01
commit 38e792b88d

View File

@ -20,7 +20,12 @@ class AgApiClient : public PrintLog {
private:
Configuration &config;
AirGradient *ag;
#ifdef ESP8266
// ESP8266 not support HTTPS
String apiRoot = "http://hw.airgradient.com";
#else
String apiRoot = "https://hw.airgradient.com";
#endif
bool apiRootChanged = false; // Indicate if setApiRoot() is called
bool getConfigFailed;