Show more information about the request result in manual test

Show the HTTP status as well as data retrieved by the server.
This commit is contained in:
Vadim Zeitlin 2021-01-15 02:52:15 +01:00
parent f9d7a06c37
commit f85f716cea

View File

@ -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);