![]() QNetworkCookieJar *QNetworkAccessManager:: cookieJar() const See also connectToHost(), get(), post(), put(), and deleteResource(). Note: This function has no possibility to report errors. ![]() This function is useful to complete the TCP handshake to a host before the HTTP request is made, resulting in a lower network latency. Initiates a connection to the host given by hostName at port port. void QNetworkAccessManager:: connectToHost(const QString & hostName, quint16 port = 80) In contrast to clearAccessCache() the authentication data is preserved. void QNetworkAccessManager:: clearConnectionCache()įlushes the internal cache of network connections. This function is useful for doing auto tests. void QNetworkAccessManager:: clearAccessCache()įlushes the internal cache of authentication data and network connections. Returns the cache that is used to store data obtained from the network. QAbstractNetworkCache *QNetworkAccessManager:: cache() const See also setAutoDeleteReplies and QNetworkRequest::AutoDeleteReplyOnFinishAttribute. Returns the true if QNetworkAccessManager is currently configured to automatically delete QNetworkReplies, false otherwise. bool QNetworkAccessManager:: autoDeleteReplies() const See also proxyAuthenticationRequired(), QAuthenticator::setUser(), and QAuthenticator::setPassword(). Note: It is not possible to use a QueuedConnection to connect to this signal, as the connection will fail if the authenticator has not been filled in with new information when the signal returns. If it rejects the credentials, this signal will be emitted again. QNetworkAccessManager will cache the credentials internally and will send the same values if the server requires authentication again, without emitting the authenticationRequired() signal. The slot connected to this signal should fill the credentials for the contents (which can be determined by inspecting the reply object) in the authenticator object. This signal is emitted whenever a final server requests authentication before it delivers the requested contents. void QNetworkAccessManager:: authenticationRequired( QNetworkReply * reply, QAuthenticator * authenticator) See also addStrictTransportSecurityHosts(), enableStrictTransportSecurityStore(), and QHstsPolicy. The current implementation thus is server-driven, client code can provide QNetworkAccessManager with previously known or discovered policies, but this information can be overridden by "Strict-Transport-Security" response headers. Note: While processing HTTP responses, QNetworkAccessManager can also update the HSTS cache, removing or updating exitsting policies or introducing new knownHosts. SetTransferTimeout(int timeout = QNetworkRequest::DefaultTransferTimeoutConstant) SetStrictTransportSecurityEnabled(bool enabled) SetRedirectPolicy(QNetworkRequest::RedirectPolicy policy) SetProxyFactory(QNetworkProxyFactory * factory) SetCookieJar(QNetworkCookieJar * cookieJar) SetAutoDeleteReplies(bool shouldAutoDelete) SendCustomRequest(const QNetworkRequest & request, const QByteArray & verb, QHttpMultiPart * multiPart) ![]() SendCustomRequest(const QNetworkRequest & request, const QByteArray & verb, const QByteArray & data) SendCustomRequest(const QNetworkRequest & request, const QByteArray & verb, QIODevice * data = nullptr) Put(const QNetworkRequest & request, QHttpMultiPart * multiPart) Put(const QNetworkRequest & request, const QByteArray & data) Put(const QNetworkRequest & request, QIODevice * data) Post(const QNetworkRequest & request, QHttpMultiPart * multiPart) Post(const QNetworkRequest & request, const QByteArray & data) Post(const QNetworkRequest & request, QIODevice * data) ![]() IsStrictTransportSecurityStoreEnabled() const QNetworkAccessManager(QObject * parent = nullptr)ĪddStrictTransportSecurityHosts(const QList & knownHosts)ĬonnectToHost(const QString & hostName, quint16 port = 80)ĬonnectToHostEncrypted(const QString & hostName, quint16 port = 443, const QSslConfiguration & sslConfiguration = QSslConfiguration::defaultConfiguration())ĬonnectToHostEncrypted(const QString & hostName, quint16 port, const QSslConfiguration & sslConfiguration, const QString & peerName)ĭeleteResource(const QNetworkRequest & request)ĮnableStrictTransportSecurityStore(bool enabled, const QString & storeDir = QString())
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |