From f85f716cea79473b343f0c4585f864dfaa38eef7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 15 Jan 2021 02:52:15 +0100 Subject: [PATCH] Show more information about the request result in manual test Show the HTTP status as well as data retrieved by the server. --- tests/net/webrequest.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/net/webrequest.cpp b/tests/net/webrequest.cpp index dd3f2a0593..115ae97b14 100644 --- a/tests/net/webrequest.cpp +++ b/tests/net/webrequest.cpp @@ -309,7 +309,16 @@ TEST_CASE_METHOD(RequestFixture, } CreateAbs(url); - Run(wxWebRequest::State_Completed, 0); + request.Start(); + RunLoopWithTimeout(); + + WARN("Request state " << request.GetState()); + wxWebResponse response = request.GetResponse(); + REQUIRE( response.IsOk() ); + WARN("Status: " << response.GetStatus() + << " (" << response.GetStatusText() << ")\n" << + "Body length: " << response.GetContentLength() << "\n" << + "Body: " << response.AsString() << "\n"); } WX_DECLARE_STRING_HASH_MAP(wxString, wxWebRequestHeaderMap);