<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QNetworkAccessManager User Agent]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I using QNetworkAccessManager like this ;</p>
<p dir="auto">QNetworkAccessManager LManager;<br />
QNetworkReply* reply = LManager.get(QNetworkRequest(QUrl(URL)));<br />
QEventLoop event;<br />
connect(reply, SIGNAL(finished()), &amp;event, SLOT(quit()));<br />
event.exec();<br />
return reply-&gt;readAll();</p>
<p dir="auto">But i need to do this request with " User agent ". How can i do this ?<br />
Help me please. Thank you</p>
]]></description><link>https://forum.qt.io/topic/98977/qnetworkaccessmanager-user-agent</link><generator>RSS for Node</generator><lastBuildDate>Thu, 06 Aug 2026 06:58:20 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/98977.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 26 Jan 2019 15:36:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QNetworkAccessManager User Agent on Sat, 26 Jan 2019 16:07:26 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
something like</p>
<pre><code>QNetworkRequest request;
request.setUrl(QUrl("http://qt-project.org")); //// CHANGE
request.setRawHeader("User-Agent", "MyOwnBrowser 1.0");

QNetworkAccessManager LManager;
QNetworkReply* reply = LManager.get(request);
QEventLoop event;
connect(reply, SIGNAL(finished()), &amp;event, SLOT(quit()));
event.exec();
return reply-&gt;readAll();
</code></pre>
]]></description><link>https://forum.qt.io/post/507396</link><guid isPermaLink="true">https://forum.qt.io/post/507396</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Sat, 26 Jan 2019 16:07:26 GMT</pubDate></item></channel></rss>