From 2f9539e4b3e54a5b6f63ecb0370ef5ee6095ed19 Mon Sep 17 00:00:00 2001 From: helgeerbe Date: Fri, 15 Sep 2023 09:57:25 +0200 Subject: [PATCH] print out debug messages --- src/HttpPowerMeter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/HttpPowerMeter.cpp b/src/HttpPowerMeter.cpp index bae9f14c..387a574e 100644 --- a/src/HttpPowerMeter.cpp +++ b/src/HttpPowerMeter.cpp @@ -111,6 +111,8 @@ bool HttpPowerMeterClass::httpRequest(const char* url, Auth authType, const char int httpCode = httpClient.GET(); + MessageOutput.printf("[HttpPowerMeter] httpCode %d \r\n", httpCode); + if (httpCode == HTTP_CODE_UNAUTHORIZED && authType == Auth::digest) { // Handle authentication challenge char realm[256]; // Buffer to store the realm received from the server @@ -161,7 +163,9 @@ bool HttpPowerMeterClass::httpRequest(const char* url, Auth authType, const char authorization += response; authorization += "\", algorithm=SHA-256"; httpClient.addHeader("Authorization", authorization); + MessageOutput.printf("[HttpPowerMeter] authorization header %s \r\n", authorization.c_str()); httpCode = httpClient.GET(); + MessageOutput.printf("[HttpPowerMeter] 2nd httpCode %d \r\n", httpCode); } } }