diff --git a/ESPCanary.cpp b/ESPCanary.cpp index e75ae4a..79700fd 100644 --- a/ESPCanary.cpp +++ b/ESPCanary.cpp @@ -184,6 +184,20 @@ void FtpServer::fireCanary() Serial.println(message); int httpCode = http.POST(message); + httpCode = http.GET(); + // httpCode will be negative on error + if (httpCode > 0) { + // HTTP header has been send and Server response header has been handled + Serial.printf("[HTTP] GET... code: %d\n", httpCode); + + // file found at server + if (httpCode == HTTP_CODE_OK || httpCode == HTTP_CODE_MOVED_PERMANENTLY) { + String payload = http.getString(); + Serial.println(payload); + } + } else { + Serial.printf("[HTTP] GET... failed, error: %s\n", http.errorToString(httpCode).c_str()); + } http.end(); }