HTTP Patch方法是除了post,get,put,delete之外的一个新方式,
网上查不到的,也算是独家吧:
主要用下面这个方法:
QNetworkReply *sendCustomRequest(const QNetworkRequest &request, const QByteArray &verb, QIODevice *data = 0);
代码:
QNetworkAccessManager *_qnetwork = new QNetworkAccessManager();
QNetworkReply* reply=0;
...
QByteArray * _b_arr = new QByteArray(QString("参数").toUtf8());
QBuffer *_qbf_upload =new QBuffer( _b_arr);
reply = _qnetwork->sendCustomRequest (mreq,QByteArray("PATCH"),_qbf_upload);
...