Fix http test print

This commit is contained in:
halx99 2023-01-05 23:31:39 +08:00
parent da7987214f
commit 857f669970
1 changed files with 2 additions and 2 deletions

View File

@ -314,7 +314,7 @@ void HttpClientTest::onHttpRequestCompleted(HttpClient* sender, HttpResponse* re
int32_t statusCode = response->getResponseCode();
char statusString[64] = {};
sprintf(statusString, "HTTP Status Code: %d, tag = %s", statusCode, response->getHttpRequest()->getTag());
sprintf(statusString, "HTTP Status Code: %d, tag = %s", statusCode, tag.data());
_labelStatusCode->setString(statusString);
ax::print("response code: %d", statusCode);
@ -465,7 +465,7 @@ void HttpClientClearRequestsTest::onHttpRequestCompleted(HttpClient* sender, Htt
int32_t statusCode = response->getResponseCode();
char statusString[64] = {};
sprintf(statusString, "HTTP Status Code: %d, tag = %s", statusCode, response->getHttpRequest()->getTag());
sprintf(statusString, "HTTP Status Code: %d, tag = %s", statusCode, tag.data());
_labelStatusCode->setString(statusString);
ax::print("response code: %d", statusCode);