Skip to content

Commit

Permalink
fix: warnings due to missing Content-Type header
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Jul 23, 2023
1 parent f75725a commit 6fad220
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/vendor/qt-google-analytics/qt-google-analytics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ void QtGoogleAnalytics::sendEvent(const QString &name, const QVariantMap &parame
url.setQuery(query);

QNetworkRequest request(url);
request.setHeader(QNetworkRequest::UserAgentHeader, m_userAgent.toLatin1());
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
request.setHeader(QNetworkRequest::UserAgentHeader, m_userAgent);
m_uach.setRequestHeaders(request);

QNetworkReply *reply = m_networkAccessManager->post(request, QByteArray());
Expand Down

0 comments on commit 6fad220

Please sign in to comment.