Skip to content

Commit

Permalink
print out debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
helgeerbe committed Sep 15, 2023
1 parent f7bd4a4 commit 2f9539e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/HttpPowerMeter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 2f9539e

Please sign in to comment.