Add wxWebRequest::SplitParameters method

This method is adapted for use in wxWidgets from the Poco library.
This commit is contained in:
Tobias Taschner
2018-11-01 17:33:56 +01:00
parent 028af93c35
commit f40e2e64d9
4 changed files with 112 additions and 0 deletions

View File

@@ -197,4 +197,17 @@ TEST_CASE_METHOD(RequestFixture, "WebRequest", "[net][.]")
}
}
TEST_CASE("WebRequestUtils", "[net]")
{
wxString value;
wxWebRequestHeaderMap params;
wxString header = "multipart/mixed; boundary=\"MIME_boundary_01234567\"";
wxWebRequest::SplitParameters(header, value, params);
REQUIRE( value == "multipart/mixed" );
REQUIRE( params.size() == 1 );
REQUIRE( params["boundary"] == "MIME_boundary_01234567" );
}
#endif // wxUSE_WEBREQUEST