In a existing application with Qt the QHttp-class is used to access data over the network. This communication is in the moment uncompressed, but the server allows compression (and browsers actually use it). How can I use QHttp to make accept compression?
Asked
Active
Viewed 873 times
2 Answers
2
QHttp is obsolete class. Try using QNetworkAccessManager. It uses compression by default in responses

Kamil Klimek
- 12,884
- 2
- 43
- 58
-
You are right, QNetworkAccessManager does support gzip. It wasn't clear after reading the documentation. But the old code is very entangled with the use of QHttp, to change to QNetworkAccessManager is some work. – Mnementh Jul 15 '11 at 13:45
-
So you can add to your request header "Accept-Encoding: gzip,deflate" – Kamil Klimek Jul 16 '11 at 16:27
0
According to this two sources, the server only capable to send compressed responses, and the browser do the decompressing process, so I think you have either use/implement a decompression function.

SIFE
- 5,567
- 7
- 32
- 46