I'm trying to update JSON data over a server but it is not updating, its deleting everything even if I send blank data.

Find the implementation below,

Qt Code:
  1. QNetworkAccessManager m_mgr;
  2. QNetworkRequest m_request;
  3. QNetworkReply *m_reply;
  4. QUrl url("https://api.predic8.de/shop/products/10");
  5. m_request.setUrl(url);
  7. QVariantMap data;
  8. data.insert("name", "Oranges");
  10. QJsonDocument jsonData = QJsonDocument::fromVariant(data);
  11. m_reply = m_mgr.put(m_request, jsonData.toJson(QJsonDocument::Indented));
  12. connect(m_reply, &QNetworkReply::finished, m_reply, &QNetworkReply::deleteLater);
To copy to clipboard, switch view to plain text mode 

Please help me why it delete the data instead of an update?