4#ifndef QNETWORKACCESSMANAGER_H
5#define QNETWORKACCESSMANAGER_H
7#include <QtNetwork/qtnetworkglobal.h>
8#include <QtNetwork/qnetworkrequest.h>
9#include <QtCore/QString>
10#include <QtCore/QList>
11#include <QtCore/QObject>
13#include <QtNetwork/QSslConfiguration>
14#include <QtNetwork/QSslPreSharedKeyAuthenticator>
57 void clearAccessCache();
59 void clearConnectionCache();
61#ifndef QT_NO_NETWORKPROXY
74 void setStrictTransportSecurityEnabled(
bool enabled);
75 bool isStrictTransportSecurityEnabled()
const;
77 bool isStrictTransportSecurityStoreEnabled()
const;
78 void addStrictTransportSecurityHosts(
const QList<QHstsPolicy> &knownHosts);
79 QList<QHstsPolicy> strictTransportSecurityHosts()
const;
95#if QT_CONFIG(http) || defined(Q_OS_WASM)
113 bool autoDeleteReplies()
const;
114 void setAutoDeleteReplies(
bool autoDelete);
116 QT_NETWORK_INLINE_SINCE(6, 8)
117 int transferTimeout() const;
118 QT_NETWORK_INLINE_SINCE(6, 8)
121 std::chrono::milliseconds transferTimeoutAsDuration() const;
122 void setTransferTimeout(
std::chrono::milliseconds duration =
126#ifndef QT_NO_NETWORKPROXY
142 QStringList supportedSchemesImplementation()
const;
154 Q_PRIVATE_SLOT(d_func(),
void _q_replySslErrors(QList<QSslError>))
160#if QT_NETWORK_INLINE_IMPL_SINCE(6, 8)
The QAbstractNetworkCache class provides the interface for cache implementations.
The QAuthenticator class provides an authentication object.
The QHstsPolicy class specifies that a host supports HTTP Strict Transport Security policy (HSTS).
The QHttpMultiPart class resembles a MIME multipart message to be sent over HTTP.
\inmodule QtCore \reentrant
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.
void setTransferTimeout(int timeout)
void preSharedKeyAuthenticationRequired(QNetworkReply *reply, QSslPreSharedKeyAuthenticator *authenticator)
void authenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator)
This signal is emitted whenever a final server requests authentication before it delivers the request...
std::chrono::milliseconds transferTimeoutAsDuration() const
void encrypted(QNetworkReply *reply)
int transferTimeout() const
void sslErrors(QNetworkReply *reply, const QList< QSslError > &errors)
This signal is emitted if the SSL/TLS session encountered errors during the set up,...
void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *authenticator)
This signal is emitted whenever a proxy requests authentication and QNetworkAccessManager cannot find...
The QNetworkCookieJar class implements a simple jar of QNetworkCookie objects.
The QNetworkCookie class holds one network cookie.
The QNetworkProxyFactory class provides fine-grained proxy selection.
The QNetworkProxy class provides a network layer proxy.
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
The QSslConfiguration class holds the configuration and state of an SSL connection.
static QSslConfiguration defaultConfiguration()
Returns the default SSL configuration to be used in new SSL connections.
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
QCache< int, Employee > cache
[0]
Combined button and popup list for selecting options.
static QDBusError::ErrorType get(const char *name)
GLenum GLenum GLsizei count
GLbitfield GLuint64 timeout
[4]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLenum GLsizei const GLuint GLboolean enabled
sock connectToHost(url.host(), url.port(80))
QItemEditorFactory * factory
QHttpMultiPart * multiPart
[0]
QNetworkRequest request(url)
manager setCache(diskCache)
manager deleteResource(request, this, [this](QRestReply &reply) { if(reply.isSuccess()) })
[7]
manager head(request, this, [this](QRestReply &reply) { if(reply.isSuccess()) })
[6]
manager post(request, myJson, this, [this](QRestReply &reply) { if(!reply.isSuccess()) { } if(std::optional json=reply.readJson()) { } })
manager sendCustomRequest(request, "MYMETHOD", myData, this, [this](QRestReply &reply) { if(reply.isSuccess()) })
[8]
manager put(request, myData, this, [this](QRestReply &reply) { if(reply.isSuccess()) })
[5]
serverSocket setProxy(QNetworkProxy::NoProxy)
[0]
socket connectToHostEncrypted("imap.example.com", 993)