I currently post to a ReST server in Qt6 like this:
QNetworkRequest request;request.setUrl(QUrl("someurl"));QUrlQuery postData;postData.addQueryItem("somekey","somevalue");nm = new QNetworkAccessManagerreply = nm->post(request,postData.toString(QUrl::FullyEncoded).toUtf8());
However, I am told that I need to send some JSON in the body of the request. Where do I set the body of the post? The second parameter of the ->post method is the query parameters.
I'm guessing I need to combine the body (json document) with the postData but I'm not sure how.