Name Description Size Coverage
http2 -
qabstractnetworkcache.cpp ! \class QNetworkCacheMetaData \since 4.5 \ingroup shared \inmodule QtNetwork \brief The QNetworkCacheMetaData class provides cache information. QNetworkCacheMetaData provides information about a cache file including the url, when it was last modified, when the cache file was created, headers for file and if the file should be saved onto a disk. \sa QAbstractNetworkCache 13386 -
qabstractnetworkcache.h 3133 -
qabstractnetworkcache_p.h 715 -
qabstractprotocolhandler.cpp 786 -
qabstractprotocolhandler_p.h 1569 -
qbytedatabuffer_p.h 7855 -
qdecompresshelper.cpp ! \internal Returns true if the QDecompressHelper is measuring the size of the decompressed data. \sa setCountingBytesEnabled, uncompressedSize 24838 -
qdecompresshelper_p.h 3130 -
qformdatabuilder.cpp ! \class QFormDataPartBuilder \brief The QFormDataPartBuilder class is a convenience class to simplify the construction of QHttpPart objects. \since 6.8 \ingroup network \ingroup shared \inmodule QtNetwork The QFormDataPartBuilder class can be used to build a QHttpPart object with the content disposition header set to be form-data by default. Then the generated object can be used as part of a multipart message (which is represented by the QHttpMultiPart class). \sa QHttpPart, QHttpMultiPart, QFormDataBuilder 16487 -
qformdatabuilder.h 3546 -
qhsts.cpp 16735 -
qhsts_p.h 3092 -
qhstspolicy.cpp ! \class QHstsPolicy \brief The QHstsPolicy class specifies that a host supports HTTP Strict Transport Security policy (HSTS). \since 5.9 \ingroup network \inmodule QtNetwork HSTS policy defines a period of time during which QNetworkAccessManager should only access a host in a secure fashion. HSTS policy is defined by RFC6797. You can set expiry time and host name for this policy, and control whether it applies to subdomains, either in the constructor or by calling \l setExpiry(), \l setHost() and \l setIncludesSubDomains(). \sa QNetworkAccessManager::setStrictTransportSecurityEnabled() 4920 -
qhstspolicy.h 1839 -
qhstsstore.cpp 4468 -
qhstsstore_p.h 1421 -
qhttp1configuration.cpp ! \class QHttp1Configuration \brief The QHttp1Configuration class controls HTTP/1 parameters and settings. \since 6.5 \reentrant \inmodule QtNetwork \ingroup network \ingroup shared QHttp1Configuration controls HTTP/1 parameters and settings that QNetworkAccessManager will use to send requests and process responses. \note The configuration must be set before the first request was sent to a given host (and thus an HTTP/1 session established). \sa QNetworkRequest::setHttp1Configuration(), QNetworkRequest::http1Configuration(), QNetworkAccessManager 4204 -
qhttp1configuration.h 2106 -
qhttp2configuration.cpp ! \class QHttp2Configuration \brief The QHttp2Configuration class controls HTTP/2 parameters and settings. \since 5.14 \reentrant \inmodule QtNetwork \ingroup network \ingroup shared QHttp2Configuration controls HTTP/2 parameters and settings that QNetworkAccessManager will use to send requests and process responses when the HTTP/2 protocol is enabled. The HTTP/2 parameters that QHttp2Configuration currently supports include: \list \li The session window size for connection-level flow control. Will be sent to a remote peer when needed as 'WINDOW_UPDATE' frames on the stream with an identifier 0. \li The stream receiving window size for stream-level flow control. Sent as 'SETTINGS_INITIAL_WINDOW_SIZE' parameter in the initial SETTINGS frame and, when needed, 'WINDOW_UPDATE' frames will be sent on streams that QNetworkAccessManager opens. \li The maximum frame size. This parameter limits the maximum payload a frame coming from the remote peer can have. Sent by QNetworkAccessManager as 'SETTINGS_MAX_FRAME_SIZE' parameter in the initial 'SETTINGS' frame. \li The server push. Allows to enable or disable server push. Sent as 'SETTINGS_ENABLE_PUSH' parameter in the initial 'SETTINGS' frame. \endlist The QHttp2Configuration class also controls if the header compression algorithm (HPACK) is additionally using Huffman coding for string compression. \note The configuration must be set before the first request was sent to a given host (and thus an HTTP/2 session established). \note Details about flow control, server push and 'SETTINGS' can be found in \l {https://httpwg.org/specs/rfc7540.html}{RFC 7540}. Different modes and parameters of the HPACK compression algorithm are described in \l {https://httpwg.org/specs/rfc7541.html}{RFC 7541}. \sa QNetworkRequest::setHttp2Configuration(), QNetworkRequest::http2Configuration(), QNetworkAccessManager 9717 -
qhttp2configuration.h 2012 -
qhttp2configuration_p.h 1576 -
qhttp2connection.cpp ! \class QHttp2Stream \inmodule QtNetwork \internal The QHttp2Stream class represents a single HTTP/2 stream. Must be created by QHttp2Connection. \sa QHttp2Connection 98988 -
qhttp2connection_p.h 17103 -
qhttp2protocolhandler.cpp 30899 -
qhttp2protocolhandler_p.h 3986 -
qhttpheaderparser.cpp 6822 -
qhttpheaderparser_p.h 4339 -
qhttpheaders.cpp ! \class QHttpHeaderRangeSpec \since 6.12 \inmodule QtNetwork \preliminary \compares equality \brief QHttpHeaderRangeSpec represents a single byte range as used in the HTTP \c{Range} and \c{Content-Range} headers, which RFC 9110 calls a \e{range-spec}. A range spec has an optional start and an optional end, both expressed as byte offsets. A missing start or end is represented as \c{std::nullopt}. Use \l isValid() to check whether a range spec is well-formed before passing it to \l QHttpHeaders::setRangeValues(). \sa QHttpHeaderRangeSet \sa QHttpHeaders::rangeValues(), QHttpHeaders::setRangeValues() 66150 -
qhttpheaders.h 12966 -
qhttpheadershelper.cpp 681 -
qhttpheadershelper_p.h 778 -
qhttpmultipart.cpp ! \class QHttpPart \brief The QHttpPart class holds a body part to be used inside a HTTP multipart MIME message. \since 4.8 \ingroup network \ingroup shared \inmodule QtNetwork The QHttpPart class holds a body part to be used inside a HTTP multipart MIME message (which is represented by the QHttpMultiPart class). A QHttpPart consists of a header block and a data block, which are separated by each other by two consecutive new lines. An example for one part would be: \snippet code/src_network_access_qhttppart.cpp 0 For setting headers, use setHeader() and setRawHeader(), which behave exactly like QNetworkRequest::setHeader() and QNetworkRequest::setRawHeader(). For reading small pieces of data, use setBody(); for larger data blocks like e.g. images, use setBodyDevice(). The latter method saves memory by not copying the data internally, but reading directly from the device. This means that the device must be opened and readable at the moment when the multipart message containing the body part is sent on the network via QNetworkAccessManager::post(). To construct a QHttpPart with a small body, consider the following snippet (this produces the data shown in the example above): \snippet code/src_network_access_qhttppart.cpp 1 To construct a QHttpPart reading from a device (e.g. a file), the following can be applied: \snippet code/src_network_access_qhttppart.cpp 2 Be aware that QHttpPart does not take ownership of the device when set, so it is the developer's responsibility to destroy it when it is not needed anymore. A good idea might be to set the multipart message as parent object for the device, as documented at the documentation for QHttpMultiPart. \sa QHttpMultiPart, QNetworkAccessManager 18162 -
qhttpmultipart.h 2296 -
qhttpmultipart_p.h 3990 -
qhttpnetworkconnection.cpp 62691 -
qhttpnetworkconnection_p.h 8515 -
qhttpnetworkconnectionchannel.cpp 64908 -
qhttpnetworkconnectionchannel_p.h 6707 -
qhttpnetworkheader.cpp 2036 -
qhttpnetworkheader_p.h 2215 -
qhttpnetworkreply.cpp 23454 -
qhttpnetworkreply_p.h 7566 -
qhttpnetworkrequest.cpp 11108 -
qhttpnetworkrequest_p.h 4957 -
qhttpprotocolhandler.cpp 20406 -
qhttpprotocolhandler_p.h 1082 -
qhttpthreaddelegate.cpp 29185 -
qhttpthreaddelegate_p.h 9189 -
qnetworkaccessauthenticationmanager.cpp 9236 -
qnetworkaccessauthenticationmanager_p.h 2314 -
qnetworkaccessbackend.cpp ! \class QNetworkAccessBackendFactory \brief QNetworkAccessBackendFactory is the base class to inherit from for Qt to instantiate and query your QNetworkAccessBackend plugin. \since 6.0 \internal //! [semi-private-notice] The class is considered semi-private and as such requires linking to "NetworkPrivate" to access the header. Furthermore it means the class is not under the same binary compatibility restrictions as the rest of Qt. While we still try to avoid breakage it may still occur. The class is primarily meant to be used by plugins which would be recompiled every time Qt is updated. //! [semi-private-notice] This class acts as the primary interface to the plugin and must be derived from. It deals with both querying supported schemes and the creation of QNetworkAccessBackend Since they are both abstract function you are required to implement supportedSchemes() and create(). 26302 -
qnetworkaccessbackend_p.h 5437 -
qnetworkaccesscache.cpp ! Appends the entry given by \a key to the end of the linked list. (i.e., makes it the newest entry) 8437 -
qnetworkaccesscache_p.h 2465 -
qnetworkaccesscachebackend.cpp 3298 -
qnetworkaccesscachebackend_p.h 1095 -
qnetworkaccessdebugpipebackend.cpp 7296 -
qnetworkaccessdebugpipebackend_p.h 1938 -
qnetworkaccessfilebackend.cpp 8166 -
qnetworkaccessfilebackend_p.h 1524 -
qnetworkaccessmanager.cpp 65530 -
qnetworkaccessmanager.h 6393 -
qnetworkaccessmanager_p.h 4712 -
qnetworkcookie.cpp ! \class QNetworkCookie \since 4.4 \ingroup shared \inmodule QtNetwork \brief The QNetworkCookie class holds one network cookie. Cookies are small bits of information that stateless protocols like HTTP use to maintain some persistent information across requests. A cookie is set by a remote server when it replies to a request and it expects the same cookie to be sent back when further requests are sent. QNetworkCookie holds one such cookie as received from the network. A cookie has a name and a value, but those are opaque to the application (that is, the information stored in them has no meaning to the application). A cookie has an associated path name and domain, which indicate when the cookie should be sent again to the server. A cookie can also have an expiration date, indicating its validity. If the expiration date is not present, the cookie is considered a "session cookie" and should be discarded when the application exits (or when its concept of session is over). QNetworkCookie provides a way of parsing a cookie from the HTTP header format using the QNetworkCookie::parseCookies() function. However, when received in a QNetworkReply, the cookie is already parsed. This class implements cookies as described by the \l{Netscape Cookie Specification}{initial cookie specification by Netscape}, which is somewhat similar to the \l{http://www.rfc-editor.org/rfc/rfc2109.txt}{RFC 2109} specification, plus the \l{Mitigating Cross-site Scripting With HTTP-only Cookies} {"HttpOnly" extension}. The more recent \l{http://www.rfc-editor.org/rfc/rfc2965.txt}{RFC 2965} specification (which uses the Set-Cookie2 header) is not supported. \sa QNetworkCookieJar, QNetworkRequest, QNetworkReply 35686 -
qnetworkcookie.h 2622 -
qnetworkcookie_p.h 1772 -
qnetworkcookiejar.cpp ! \class QNetworkCookieJar \since 4.4 \inmodule QtNetwork \brief The QNetworkCookieJar class implements a simple jar of QNetworkCookie objects. Cookies are small bits of information that stateless protocols like HTTP use to maintain some persistent information across requests. A cookie is set by a remote server when it replies to a request and it expects the same cookie to be sent back when further requests are sent. The cookie jar is the object that holds all cookies set in previous requests. Web browsers save their cookie jars to disk in order to conserve permanent cookies across invocations of the application. QNetworkCookieJar does not implement permanent storage: it only keeps the cookies in memory. Once the QNetworkCookieJar object is deleted, all cookies it held will be discarded as well. If you want to save the cookies, you should derive from this class and implement the saving to disk to your own storage format. This class implements only the basic security recommended by the cookie specifications and does not implement any cookie acceptance policy (it accepts all cookies set by any requests). In order to override those rules, you should reimplement the cookiesForUrl() and setCookiesFromUrl() virtual functions. They are called by QNetworkReply and QNetworkAccessManager when they detect new cookies and when they require cookies. \sa QNetworkCookie, QNetworkAccessManager, QNetworkReply, QNetworkRequest, QNetworkAccessManager::setCookieJar() 11337 -
qnetworkcookiejar.h 1266 -
qnetworkcookiejar_p.h 818 -
qnetworkdiskcache.cpp ! \class QNetworkDiskCachePrivate \internal 21326 -
qnetworkdiskcache.h 1457 -
qnetworkdiskcache_p.h 2115 -
qnetworkfile.cpp 1930 -
qnetworkfile_p.h 1057 -
qnetworkreply.cpp ! \class QNetworkReply \since 4.4 \brief The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager. \reentrant \ingroup network \inmodule QtNetwork The QNetworkReply class contains the data and metadata related to a request posted with QNetworkAccessManager. Like QNetworkRequest, it contains a URL and headers (both in parsed and raw form), some information about the reply's state and the contents of the reply itself. QNetworkReply is a sequential-access QIODevice, which means that once data is read from the object, it is no longer kept by the device. It is therefore the application's responsibility to keep this data if it needs to. Whenever more data is received from the network and processed, the readyRead() signal is emitted. The downloadProgress() signal is also emitted when data is received, but the number of bytes contained in it may not represent the actual bytes received, if any transformation is done to the contents (for example, decompressing and removing the protocol overhead). Even though QNetworkReply is a QIODevice connected to the contents of the reply, it also emits the uploadProgress() signal, which indicates the progress of the upload for operations that have such content. \note Do not delete the object in the slot connected to the errorOccurred() or finished() signal. Use deleteLater(). \sa QNetworkRequest, QNetworkAccessManager 31245 -
qnetworkreply.h 5542 -
qnetworkreply_p.h 1847 -
qnetworkreplydataimpl.cpp ! \internal 3269 -
qnetworkreplydataimpl_p.h 1586 -
qnetworkreplyfileimpl.cpp 7908 -
qnetworkreplyfileimpl_p.h 1938 -
qnetworkreplyhttpimpl.cpp 91935 -
qnetworkreplyhttpimpl_p.h 9747 -
qnetworkreplyimpl.cpp 30598 -
qnetworkreplyimpl_p.h 4882 -
qnetworkreplywasmimpl.cpp 22955 -
qnetworkreplywasmimpl_p.h ! The FetchContext class ensures the requestData object remains valid while a fetch operation is pending. Since Emscripten fetch is asynchronous, requestData must persist until one of the final callbacks is invoked. Additionally, there's a potential race condition between the thread scheduling the fetch operation and the one executing it. Since fetch must occur on the main thread due to browser limitations, a mutex safeguards the FetchContext to ensure atomic state transitions. 4555 -
qnetworkrequest.cpp ! \class QNetworkRequest \since 4.4 \ingroup network \ingroup shared \inmodule QtNetwork \brief The QNetworkRequest class holds a request to be sent with QNetworkAccessManager. QNetworkRequest is part of the Network Access API and is the class holding the information necessary to send a request over the network. It contains a URL and some ancillary information that can be used to modify the request. \sa QNetworkReply, QNetworkAccessManager 64719 -
qnetworkrequest.h 7604 -
qnetworkrequest_p.h 3059 -
qnetworkrequestfactory.cpp ! \class QNetworkRequestFactory \since 6.7 \ingroup shared \inmodule QtNetwork \brief Convenience class for grouping remote server endpoints that share common network request properties. REST servers often have endpoints that require the same headers and other data. Grouping such endpoints with a QNetworkRequestFactory makes it more convenient to issue requests to these endpoints; only the typically varying parts such as \e path and \e query parameters are provided when creating a new request. Basic usage steps of QNetworkRequestFactory are as follows: \list \li Instantiation \li Setting the data common to all requests \li Issuing requests \endlist An example of usage: \snippet code/src_network_access_qnetworkrequestfactory.cpp 0 19924 -
qnetworkrequestfactory.h 3845 -
qnetworkrequestfactory_p.h 1598 -
qrestaccessmanager.cpp ! \class QRestAccessManager \brief The QRestAccessManager is a convenience wrapper for QNetworkAccessManager. \since 6.7 \ingroup network \inmodule QtNetwork \reentrant QRestAccessManager is a convenience wrapper on top of QNetworkAccessManager. It amends datatypes and HTTP methods that are useful for typical RESTful client applications. The usual Qt networking features are accessible by configuring the wrapped QNetworkAccessManager directly. QRestAccessManager does not take ownership of the wrapped QNetworkAccessManager. QRestAccessManager and related QRestReply classes can only be used in the thread they live in. See \l {QObject#Thread Affinity}{QObject thread affinity} for more information. \section1 Issuing Network Requests and Handling Replies Network requests are initiated with a function call corresponding to the desired HTTP method, such as \c get() and \c post(). \section2 Using Signals and Slots The function returns a QNetworkReply* object, whose signals can be used to follow up on the completion of the request in a traditional Qt-signals-and-slots way. Here's an example of how you could send a GET request and handle the response: \snippet code/src_network_access_qrestaccessmanager.cpp 0 \section2 Using Callbacks and Context Objects The functions also take a context object of QObject (subclass) type and a callback function as parameters. The callback takes one QRestReply& as a parameter. The callback can be any callable, including a pointer-to-member-function. These callbacks are invoked when the reply has finished processing (also in the case the processing finished due to an error). The context object can be \c nullptr, although, generally speaking, this is discouraged. Using a valid context object ensures that if the context object is destroyed during request processing, the callback will not be called. Stray callbacks which access a destroyed context is a source of application misbehavior. Here's an example of how you could send a GET request and check the response: \snippet code/src_network_access_qrestaccessmanager.cpp 1 Many of the functions take in data for sending to a server. The data is supplied as the second parameter after the request. Here's an example of how you could send a POST request and check the response: \snippet code/src_network_access_qrestaccessmanager.cpp 2 The provided QRestReply& is valid only while the callback executes. If you need it for longer, you can either move it to another QRestReply, or construct a new one and initialize it with the QNetworkReply (see QRestReply::networkReply()). \section2 Supported data types The following table summarizes the methods and the supported data types. \c X means support. \table \header \li Data type \li \c get() \li \c post() \li \c put() \li \c head() \li \c patch() \li \c deleteResource() \li \c sendCustomRequest() \row \li No data \li X \li - \li - \li X \li - \li X \li - \row \li QByteArray \li X \li X \li X \li - \li X \li - \li X \row \li QJsonDocument *) \li X \li X \li X \li - \li X \li - \li - \row \li QVariantMap **) \li - \li X \li X \li - \li X \li - \li - \row \li QHttpMultiPart \li - \li X \li X \li - \li - \li - \li X \row \li QIODevice \li X \li X \li X \li - \li X \li - \li X \endtable ) QJsonDocument is sent in \l QJsonDocument::Compact format, and the \c Content-Type header is set to \c {application/json} if the \c Content-Type header was not set *) QVariantMap is converted to and treated as a QJsonObject \sa QRestReply, QNetworkRequestFactory, QNetworkAccessManager 34604 -
qrestaccessmanager.h end 7612 -
qrestaccessmanager_p.h 2438 -
qrestreply.cpp ! \class QRestReply \since 6.7 \brief QRestReply is a convenience wrapper for QNetworkReply. \reentrant \ingroup network \inmodule QtNetwork QRestReply wraps a QNetworkReply and provides convenience methods for data and status handling. The methods provide convenience for typical RESTful client applications. QRestReply doesn't take ownership of the wrapped QNetworkReply, and the lifetime and ownership of the reply is as defined by QNetworkAccessManager documentation. QRestReply object is not copyable, but is movable. \sa QRestAccessManager, QNetworkReply, QNetworkAccessManager, QNetworkAccessManager::setAutoDeleteReplies() 11718 -
qrestreply.h 1843 -
qrestreply_p.h 851 -
qsocketabstraction_p.h 3132 -
qtcpkeepaliveconfiguration_p.h 1504 -