QNetworkRequest Class Reference

QNetworkRequest Class Reference

#include <qnetworkrequest.h>

Class Description

Definition at line 59 of file qnetworkrequest.h.

Public Types

enum  KnownHeaders {
  ContentTypeHeader, ContentLengthHeader, LocationHeader, LastModifiedHeader,
  CookieHeader, SetCookieHeader, ContentDispositionHeader
}
 
enum  Attribute {
  HttpStatusCodeAttribute, HttpReasonPhraseAttribute, RedirectionTargetAttribute, ConnectionEncryptedAttribute,
  CacheLoadControlAttribute, CacheSaveControlAttribute, SourceIsFromCacheAttribute, DoNotBufferUploadDataAttribute,
  HttpPipeliningAllowedAttribute, HttpPipeliningWasUsedAttribute, CustomVerbAttribute, CookieLoadControlAttribute,
  AuthenticationReuseAttribute, CookieSaveControlAttribute, MaximumDownloadBufferSizeAttribute, DownloadBufferAttribute,
  SynchronousRequestAttribute, User = 1000, UserMax = 32767
}
 
enum  CacheLoadControl { AlwaysNetwork, PreferNetwork, PreferCache, AlwaysCache }
 
enum  LoadControl { Automatic = 0, Manual }
 
enum  Priority { HighPriority = 1, NormalPriority = 3, LowPriority = 5 }
 

Public Member Functions

 QNetworkRequest (const QUrl &url=QUrl())
 
 QNetworkRequest (const QNetworkRequest &other)
 
 ~QNetworkRequest ()
 
QNetworkRequestoperator= (const QNetworkRequest &other)
 
bool operator== (const QNetworkRequest &other) const
 
bool operator!= (const QNetworkRequest &other) const
 
QUrl url () const
 
void setUrl (const QUrl &url)
 
QVariant header (KnownHeaders header) const
 
void setHeader (KnownHeaders header, const QVariant &value)
 
bool hasRawHeader (const QByteArray &headerName) const
 
QList< QByteArrayrawHeaderList () const
 
QByteArray rawHeader (const QByteArray &headerName) const
 
void setRawHeader (const QByteArray &headerName, const QByteArray &value)
 
QVariant attribute (Attribute code, const QVariant &defaultValue=QVariant()) const
 
void setAttribute (Attribute code, const QVariant &value)
 
QSslConfiguration sslConfiguration () const
 
void setSslConfiguration (const QSslConfiguration &configuration)
 
void setOriginatingObject (QObject *object)
 
QObjectoriginatingObject () const
 
Priority priority () const
 
void setPriority (Priority priority)
 

Friends

class QNetworkRequestPrivate
 

Member Enumeration Documentation

Enumerator
ContentTypeHeader 
ContentLengthHeader 
LocationHeader 
LastModifiedHeader 
CookieHeader 
SetCookieHeader 
ContentDispositionHeader 

Definition at line 62 of file qnetworkrequest.h.

enum Attribute
Enumerator
HttpStatusCodeAttribute 
HttpReasonPhraseAttribute 
RedirectionTargetAttribute 
ConnectionEncryptedAttribute 
CacheLoadControlAttribute 
CacheSaveControlAttribute 
SourceIsFromCacheAttribute 
DoNotBufferUploadDataAttribute 
HttpPipeliningAllowedAttribute 
HttpPipeliningWasUsedAttribute 
CustomVerbAttribute 
CookieLoadControlAttribute 
AuthenticationReuseAttribute 
CookieSaveControlAttribute 
MaximumDownloadBufferSizeAttribute 
DownloadBufferAttribute 
SynchronousRequestAttribute 
User 
UserMax 

Definition at line 71 of file qnetworkrequest.h.

71  {
87  DownloadBufferAttribute, // internal
88  SynchronousRequestAttribute, // internal
89 
90  User = 1000,
91  UserMax = 32767
92  };
Enumerator
AlwaysNetwork 
PreferNetwork 
PreferCache 
AlwaysCache 

Definition at line 93 of file qnetworkrequest.h.

Enumerator
Automatic 
Manual 

Definition at line 99 of file qnetworkrequest.h.

enum Priority
Enumerator
HighPriority 
NormalPriority 
LowPriority 

Definition at line 104 of file qnetworkrequest.h.

Constructor & Destructor Documentation

QNetworkRequest ( const QUrl url = QUrl())
explicit
QNetworkRequest ( const QNetworkRequest other)

Member Function Documentation

QNetworkRequest& operator= ( const QNetworkRequest other)
bool operator== ( const QNetworkRequest other) const
bool operator!= ( const QNetworkRequest other) const
inline

Definition at line 116 of file qnetworkrequest.h.

117  { return !operator==(other); }
bool operator==(const QNetworkRequest &other) const
QUrl url ( ) const
void setUrl ( const QUrl url)
QVariant header ( KnownHeaders  header) const
void setHeader ( KnownHeaders  header,
const QVariant value 
)
bool hasRawHeader ( const QByteArray headerName) const
QList<QByteArray> rawHeaderList ( ) const
QByteArray rawHeader ( const QByteArray headerName) const
void setRawHeader ( const QByteArray headerName,
const QByteArray value 
)
QVariant attribute ( Attribute  code,
const QVariant defaultValue = QVariant() 
) const
void setAttribute ( Attribute  code,
const QVariant value 
)
QSslConfiguration sslConfiguration ( ) const
void setSslConfiguration ( const QSslConfiguration configuration)
void setOriginatingObject ( QObject object)
QObject* originatingObject ( ) const
Priority priority ( ) const
void setPriority ( Priority  priority)

Friends And Related Function Documentation

friend class QNetworkRequestPrivate
friend

Definition at line 149 of file qnetworkrequest.h.


The documentation for this class was generated from the following file: