Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
src_network_access_qnetworkaccessmanager.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
7 this, &MyClass::replyFinished);
8
9manager->get(QNetworkRequest(QUrl("http://qt-project.org")));
11
12
15request.setUrl(QUrl("http://qt-project.org"));
16request.setRawHeader("User-Agent", "MyOwnBrowser 1.0");
17
19connect(reply, &QIODevice::readyRead, this, &MyClass::slotReadyRead);
21 this, &MyClass::slotError);
22connect(reply, &QNetworkReply::sslErrors,
23 this, &MyClass::slotSslErrors);
void readyRead()
This signal is emitted once every time new data is available for reading from the device's current re...
The QNetworkAccessManager class allows the application to send network requests and receive replies.
void finished(QNetworkReply *reply)
This signal is emitted whenever a pending network reply is finished.
QNetworkReply * get(const QNetworkRequest &request)
Posts a request to obtain the contents of the target request and returns a new QNetworkReply object o...
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
void errorOccurred(QNetworkReply::NetworkError)
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
void setRawHeader(const QByteArray &headerName, const QByteArray &value)
Sets the header headerName to be of value headerValue.
void setUrl(const QUrl &url)
Sets the URL this network request is referring to be url.
\inmodule QtCore
Definition qurl.h:94
QNetworkAccessManager * manager
[0]
connect(manager, &QNetworkAccessManager::finished, this, &MyClass::replyFinished)
QNetworkRequest request
[0]