From 857f669970e772ea6649e0188fe7f77c408e7a9b Mon Sep 17 00:00:00 2001 From: halx99 Date: Thu, 5 Jan 2023 23:31:39 +0800 Subject: [PATCH] Fix http test print --- .../Classes/NetworkTest/HttpClientTest/HttpClientTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/cpp-tests/Classes/NetworkTest/HttpClientTest/HttpClientTest.cpp b/tests/cpp-tests/Classes/NetworkTest/HttpClientTest/HttpClientTest.cpp index 63a94eb70c..1884d49e44 100644 --- a/tests/cpp-tests/Classes/NetworkTest/HttpClientTest/HttpClientTest.cpp +++ b/tests/cpp-tests/Classes/NetworkTest/HttpClientTest/HttpClientTest.cpp @@ -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);