webkit content-type missing in HTTP

使用webkit自定义请求时会报出以下警告:
content-type missing in HTTP POST, defaulting to application/x-www-form-urlencoded. Use QNetworkRequest::setHeader() to fix this problem.
解决方法:
request.setHeader(QNetworkRequest.ContentTypeHeader, ("text/html; charset=utf-8"));

原文地址:https://www.cnblogs.com/y3w3l/p/6539232.html