![]() ![]() QNetworkRequest.DoNotBufferUploadDataAttribute Replies only, type: Bool (default: false) Indicates whether the data was obtained from cache or not. QNetworkRequest.SourceIsFromCacheAttribute If true, data may be cached, provided it is cacheable (what is cacheable depends on the protocol being used). If the value is false, the data obtained will not be automatically cached. Requests only, type: Bool (default: true) Controls if the data obtained should be saved to cache for future uses. However, this attribute may be used by certain backends to modify their requests (for example, for caching proxies). Note that the default QNetworkAccessManager implementation does not support caching. The possible values are those of CacheLoadControl. Requests only, type: Int (default: PreferNetwork ) Controls how the cache should be accessed. QNetworkRequest.CacheLoadControlAttribute Replies only, type: Bool (default: false) Indicates whether the data was obtained through an encrypted (secure) connection. QNetworkRequest.ConnectionEncryptedAttribute Use resolved() to create an absolute URL out of it. The Network Access API does not by default follow redirections: the application can determine if the requested redirection should be allowed, according to its security policies, or it can set to true (in which case the redirection will be followed and this attribute will not be present in the reply). Replies only, type: QUrl (no default) If present, it indicates that the server is redirecting the request to a different URL. QNetworkRequest.RedirectionTargetAttribute If the connection was not HTTP-based, this attribute will not be present. Replies only, type: QByteArray (no default) Indicates the HTTP reason phrase as received from the HTTP server (like “Ok”, “Found”, “Not Found”, “Access Denied”, etc.) This is the human-readable representation of the status code (see above). QNetworkRequest.HttpReasonPhraseAttribute Replies only, type: Int (no default) Indicates the HTTP status code received from the HTTP server (like 200, 304, 404, 401, etc.). The following table explains what the default attribute codes are, the QVariant types associated, the default value if said attribute is missing and whether it’s used in requests or replies. Attributes are also extensible, allowing custom implementations to pass custom values. Īttributes are extra meta-data that are used to control the behavior of the request and to pass further information from the reply back to the application. Attribute ¶Īttribute codes for the QNetworkRequest and QNetworkReply. Header() setHeader() rawHeader() setRawHeader(). The Server header received by HTTP clients. The User-Agent header sent by HTTP clients. The server shall send a 304 (Not Modified) response if the resource does match.Ĭorresponds to the HTTP Cookie header and contains a QList representing the cookies to be sent back to the server.Ĭorresponds to the HTTP Set-Cookie header and contains a QList representing the cookies sent by the server to be stored locally. ![]() It is usually added to a QNetworkRequest. The server shall send a 412 (Precondition Failed) response if the resource does not match.Ĭorresponds to the HTTP If-None-Match header and contains a QStringList. ![]() The server shall send a 304 (Not Modified) response if the resource has not changed since this time.Ĭorresponds to the HTTP ETag header and contains a QString representing the last modification state of the contents.Ĭorresponds to the HTTP If-Match header and contains a QStringList. Each known header is also represented in raw form with its full HTTP name.Ĭorresponds to the HTTP Content-Disposition header and contains a string containing the disposition type (for instance, attachment) and a parameter (for instance, filename).Ĭorresponds to the HTTP Content-Type header and contains a string containing the media (MIME) type and any auxiliary data (for instance, charset).Ĭorresponds to the HTTP Content-Length header and contains the length in bytes of the data transmitted.Ĭorresponds to the HTTP Location header and contains a URL representing the actual location of the data, including the destination URL in case of redirections.Ĭorresponds to the HTTP Last-Modified header and contains a QDateTime representing the last modification date of the contents.Ĭorresponds to the HTTP If-Modified-Since header and contains a QDateTime. List of known header types that QNetworkRequest parses. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |