fix http.GetString

This commit is contained in:
MichaelDvP
2024-07-20 19:10:20 +02:00
parent c21c0b5dd1
commit 4dd3a668df

View File

@@ -630,7 +630,6 @@ std::string compute(const std::string & expr) {
} else { } else {
httpResult = http.GET(); // normal GET httpResult = http.GET(); // normal GET
} }
http.end();
if (httpResult > 0) { if (httpResult > 0) {
std::string result = emsesp::Helpers::toLower(http.getString().c_str()); std::string result = emsesp::Helpers::toLower(http.getString().c_str());
@@ -641,6 +640,7 @@ std::string compute(const std::string & expr) {
} }
expr_new.replace(f, e - f, result.c_str()); expr_new.replace(f, e - f, result.c_str());
} }
http.end();
} }
} }
f = expr_new.find_first_of("{", e); f = expr_new.find_first_of("{", e);