Hey all... What is the best way to download a file from HTTP or HTTPS, and turn the contents into a QString for I can manipulate it.
Also, when downloading the file, is there a difference when doing it if the protocol is HTTP or HTTPS?
Thanks
Hey all... What is the best way to download a file from HTTP or HTTPS, and turn the contents into a QString for I can manipulate it.
Also, when downloading the file, is there a difference when doing it if the protocol is HTTP or HTTPS?
Thanks
The result is the same, but once it is transfered unencrypted and the other time it is encrypted (for the transfering only). See QNetworkAccessManager.
Assuming you use QNetworkAccessManager:
Connect a slot to the readyRead signal, then use readAll to read the complete response (might take several passes to readyRead!).
When you have the bytearray, construct a qstring from this bytearray: QString(myByteArray)
Edit:
There is a difference between https and http at the protocol level. For you and me, it doesn't matter. Qt handles this behind the scenes.
Bookmarks