7#include <QtNetwork/qtnetworkglobal.h>
8#include <QtCore/QIODevice>
9#include <QtCore/QString>
10#include <QtCore/QVariant>
12#include <QtNetwork/QNetworkRequest>
13#include <QtNetwork/QNetworkAccessManager>
34 ConnectionRefusedError = 1,
45 UnknownNetworkError = 99,
48 ProxyConnectionRefusedError = 101,
53 UnknownProxyError = 199,
56 ContentAccessDenied = 201,
63 UnknownContentError = 299,
66 ProtocolUnknownError = 301,
68 ProtocolFailure = 399,
71 InternalServerError = 401,
74 UnknownServerError = 499
81 virtual void close()
override;
82 virtual bool isSequential()
const override;
85 qint64 readBufferSize()
const;
91 NetworkError
error()
const;
92 bool isFinished()
const;
100#if QT_NETWORK_REMOVED_SINCE(6, 7)
101 bool hasRawHeader(
const QByteArray &headerName)
const;
104 QList<QByteArray> rawHeaderList()
const;
105#if QT_NETWORK_REMOVED_SINCE(6, 7)
111 const QList<RawHeaderPair>& rawHeaderPairs()
const;
135 void sslErrors(
const QList<QSslError> &errors);
152 void setFinished(
bool);
164 virtual void ignoreSslErrorsImplementation(
const QList<QSslError> &);
174 QNetworkReply__NetworkError, Q_NETWORK_EXPORT)
The QAuthenticator class provides an authentication object.
\inmodule QtCore \reentrant
The QNetworkAccessManager class allows the application to send network requests and receive replies.
Operation
Indicates the operation this reply is processing.
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
void socketStartedConnecting()
void errorOccurred(QNetworkReply::NetworkError)
void metaDataChanged()
\omit FIXME: Update name? \endomit
void uploadProgress(qint64 bytesSent, qint64 bytesTotal)
This signal is emitted to indicate the progress of the upload part of this network request,...
void redirected(const QUrl &url)
QPair< QByteArray, QByteArray > RawHeaderPair
RawHeaderPair is a QPair<QByteArray, QByteArray> where the first QByteArray is the header name and th...
void downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
This signal is emitted to indicate the progress of the download part of this network request,...
virtual void abort()=0
Aborts the operation immediately and close down any network connections still open.
NetworkError
Indicates all possible error conditions found during the processing of the request.
@ ContentOperationNotPermittedError
@ ProxyConnectionClosedError
@ OperationNotImplementedError
@ TemporaryNetworkFailureError
@ ServiceUnavailableError
@ BackgroundRequestNotAllowedError
@ SslHandshakeFailedError
@ ProtocolInvalidOperationError
@ NetworkSessionFailedError
@ ProxyAuthenticationRequiredError
@ AuthenticationRequiredError
void finished()
This signal is emitted when the reply has finished processing.
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
KnownHeaders
List of known header types that QNetworkRequest parses.
The QSslConfiguration class holds the configuration and state of an SSL connection.
The QSslError class provides an SSL error.
The QSslPreSharedKeyAuthenticator class provides authentication data for pre shared keys (PSK) cipher...
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
static QString header(const QString &name)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
EGLOutputLayerEXT EGLint attribute
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
static void setError(QJsonObject *response, const QString &msg)
request setUrl(QUrl("http://qt-project.org"))
QUrl url("example.com")
[constructor-url-reference]
void writeData(const QByteArray &data)
app setAttribute(Qt::AA_DontShowIconsInMenus)
QNetworkAccessManager manager
QNetworkRequest request(url)
textPart setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"text\""))
imagePart setRawHeader("Content-ID", "my@content.id")
reply ignoreSslErrors(expectedSslErrors)
sslSocket setSslConfiguration(config)