Re: [Interest] Preventing QUrl from encoding query parameters

2014-08-06 Thread Lorne Sturtevant
> Just open a QTcpSocket to the server and send the GET command. > > And add this comment to your source code: > > // This looks like HTTP but isn't! > // This is actually a binary protocol, since it doesn't conform > // to RFC 2616 and RFC 3896. > Thanks for the tip. That'll b

Re: [Interest] Preventing QUrl from encoding query parameters

2014-08-06 Thread Konstantin Tokarev
06.08.2014, 09:30, "Thiago Macieira" : > On Tuesday 05 August 2014 10:01:30 Lorne Sturtevant wrote: >>>  You can't do what you want. QUrl will normalise what it has to. >>  That's what I had feared.  I was digging through the source I couldn't >>  find a hidden "force do things wrong" flag. >>>  

Re: [Interest] Preventing QUrl from encoding query parameters

2014-08-05 Thread Thiago Macieira
On Tuesday 05 August 2014 10:01:30 Lorne Sturtevant wrote: > > You can't do what you want. QUrl will normalise what it has to. > > That's what I had feared. I was digging through the source I couldn't > find a hidden "force do things wrong" flag. > > > So just make sure that you are running Qt 5

Re: [Interest] Preventing QUrl from encoding query parameters

2014-08-05 Thread Lorne Sturtevant
> You can't do what you want. QUrl will normalise what it has to. That's what I had feared. I was digging through the source I couldn't find a hidden "force do things wrong" flag. > So just make sure that you are running Qt 5.3, since there were bugs in > previous versions. If that doesn't work,

Re: [Interest] Preventing QUrl from encoding query parameters

2014-08-03 Thread Thiago Macieira
On Sunday 03 August 2014 18:52:05 Konstantin Tokarev wrote: > 03.08.2014, 06:18, "Thiago Macieira" : > > On Saturday 02 August 2014 13:26:15 Lorne Sturtevant wrote: > >> On 08/02/2014 11:27 AM, Dmitriy Purgin wrote: > >>> Hi, > >>> > >>> If you pass this raw QString or QByteArray somewhere, why

Re: [Interest] Preventing QUrl from encoding query parameters

2014-08-03 Thread Konstantin Tokarev
03.08.2014, 06:18, "Thiago Macieira" : > On Saturday 02 August 2014 13:26:15 Lorne Sturtevant wrote: >>  On 08/02/2014 11:27 AM, Dmitriy Purgin wrote: >>>  Hi, >>> >>>  If you pass this raw QString or QByteArray somewhere, why use QUrl >>> >>>  then? Anyway, try QUrl::fromPercentEncoding(): >>>  

Re: [Interest] Preventing QUrl from encoding query parameters

2014-08-02 Thread Thiago Macieira
On Saturday 02 August 2014 13:26:15 Lorne Sturtevant wrote: > On 08/02/2014 11:27 AM, Dmitriy Purgin wrote: > > Hi, > > > > If you pass this raw QString or QByteArray somewhere, why use QUrl > > > > then? Anyway, try QUrl::fromPercentEncoding(): > > QUrl url("http://example.com?query=[{\"name

Re: [Interest] Preventing QUrl from encoding query parameters

2014-08-02 Thread Lorne Sturtevant
On 08/02/2014 11:27 AM, Dmitriy Purgin wrote: > Hi, > > If you pass this raw QString or QByteArray somewhere, why use QUrl > then? Anyway, try QUrl::fromPercentEncoding(): > > QUrl url("http://example.com?query=[{\"name\":\"value\"}]";); > qDebug() << QUrl::fromPercentEncoding(url.toEncoded

Re: [Interest] Preventing QUrl from encoding query parameters

2014-08-02 Thread Dmitriy Purgin
Hi, If you pass this raw QString or QByteArray somewhere, why use QUrl then? Anyway, try QUrl::fromPercentEncoding(): QUrl url("http://example.com?query=[{\"name\":\"value\"}]";); qDebug() << QUrl::fromPercentEncoding(url.toEncoded()); // produces: "http://example.com?query=[{"name":"

[Interest] Preventing QUrl from encoding query parameters

2014-08-01 Thread Lorne Sturtevant
I am to connect to a 3rd party API over http. This API does not accept requests that the URLs that are properly percent encoded for invalid characters. For example. It requires urls to be of the form: http://example.com?query=[{"name":"value"}]. I create the QUrl like this: QUrl url = QUrl::fro