Problem with automatic url encoding
For a REST webservice I need to submit data with an exact format:
The sample parameter value for "test" should be exactly "a%3D" (which is the percentage encoding for "a="). When I enter the url in Firefox it arrives at the test.php script as intended. But when I use the QNetworkAccessManager "a%3D" is percentage encoded again and arriving as "a%253D" on the server. The whole Qt code is as follows:
QString strUrl = "http://myserver.com/test.php?test=a%3D";
I also tried to set strUrl without percentage encoding with the hope that it might be encoded:
QString strUrl = "http://myserver.com/test.php?test=a=";
but this returns "test=a=" instead of "test=a%3D" on the server.
How can fix this encoding problem?
Re: Problem with automatic url encoding
I think I found it (based on the suggestions of other threads after posting...):
QUrl url = QUrl::fromUserInput(strUrl);