QNetworkRequest request(QUrl("https://example.com/api")); QNetworkReply* reply = manager.get(request); reply->setProperty("request_url", request.url().toString());
QNetworkReply* reply = manager.post(request, data); reply->setProperty("custom_data", QVariant::fromValue(custom_data));This code attaches a custom_data object to the network reply for later use. Both examples use the QVariant class to store the data being set. The package library for QNetworkReply setProperty is Qt Networking.