QT5 QNetworkAccessManager only has finished signal IS NOT enough
-
for some case, when QNetworkAccessManager has send HTTP GET request, and the http server continue send data to client, and it will never finished, so the finished signal never emit.
I think the QNetworkAccessManager should have some signal like readyread or http header finished signal.
-
Use QNetworkReply::readyRead()
-
You can hear about the HTTP response headers as they arrive with the QNetworkReply::metaDataChanged() signal. As soon as you receive the first byte of response data, i.e. the first time QNetworkReply::readyRead() is emitted, the headers are fully known and accessible through the QNetworkReply object.