C++ (Qt) if (file.open(QIODevice::WriteOnly)) { file.write(reply->readAll()); file.flush(); file.close(); }