Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QHttpNetworkRequest Class Reference

#include <qhttpnetworkrequest_p.h>

+ Inheritance diagram for QHttpNetworkRequest:
+ Collaboration diagram for QHttpNetworkRequest:

Public Types

enum  Operation {
  Options , Get , Head , Post ,
  Put , Delete , Trace , Connect ,
  Custom
}
 
enum  Priority { HighPriority , NormalPriority , LowPriority }
 

Public Member Functions

 QHttpNetworkRequest (const QUrl &url=QUrl(), Operation operation=Get, Priority priority=NormalPriority)
 
 QHttpNetworkRequest (const QHttpNetworkRequest &other)
 
virtual ~QHttpNetworkRequest ()
 
QHttpNetworkRequestoperator= (const QHttpNetworkRequest &other)
 
bool operator== (const QHttpNetworkRequest &other) const
 
QUrl url () const override
 
void setUrl (const QUrl &url) override
 
int majorVersion () const override
 
int minorVersion () const override
 
qint64 contentLength () const override
 
void setContentLength (qint64 length) override
 
QList< QPair< QByteArray, QByteArray > > header () const override
 
QByteArray headerField (const QByteArray &name, const QByteArray &defaultValue=QByteArray()) const override
 
void setHeaderField (const QByteArray &name, const QByteArray &data) override
 
void prependHeaderField (const QByteArray &name, const QByteArray &data)
 
void clearHeaders ()
 
Operation operation () const
 
void setOperation (Operation operation)
 
QByteArray customVerb () const
 
void setCustomVerb (const QByteArray &customOperation)
 
Priority priority () const
 
void setPriority (Priority priority)
 
bool isPipeliningAllowed () const
 
void setPipeliningAllowed (bool b)
 
bool isHTTP2Allowed () const
 
void setHTTP2Allowed (bool b)
 
bool isHTTP2Direct () const
 
void setHTTP2Direct (bool b)
 
bool isH2cAllowed () const
 
void setH2cAllowed (bool b)
 
bool withCredentials () const
 
void setWithCredentials (bool b)
 
bool isSsl () const
 
void setSsl (bool)
 
bool isPreConnect () const
 
void setPreConnect (bool preConnect)
 
bool isFollowRedirects () const
 
void setRedirectPolicy (QNetworkRequest::RedirectPolicy policy)
 
QNetworkRequest::RedirectPolicy redirectPolicy () const
 
int redirectCount () const
 
void setRedirectCount (int count)
 
void setUploadByteDevice (QNonContiguousByteDevice *bd)
 
QNonContiguousByteDeviceuploadByteDevice () const
 
QByteArray methodName () const
 
QByteArray uri (bool throughProxy) const
 
QString peerVerifyName () const
 
void setPeerVerifyName (const QString &peerName)
 
- Public Member Functions inherited from QHttpNetworkHeader
virtual ~QHttpNetworkHeader ()
 
virtual QUrl url () const =0
 
virtual void setUrl (const QUrl &url)=0
 
virtual int majorVersion () const =0
 
virtual int minorVersion () const =0
 
virtual qint64 contentLength () const =0
 
virtual void setContentLength (qint64 length)=0
 
virtual QList< QPair< QByteArray, QByteArray > > header () const =0
 
virtual QByteArray headerField (const QByteArray &name, const QByteArray &defaultValue=QByteArray()) const =0
 
virtual void setHeaderField (const QByteArray &name, const QByteArray &data)=0
 

Friends

class QHttpNetworkRequestPrivate
 
class QHttpNetworkConnectionPrivate
 
class QHttpNetworkConnectionChannel
 
class QHttpProtocolHandler
 
class QHttp2ProtocolHandler
 
class QSpdyProtocolHandler
 

Detailed Description

Definition at line 32 of file qhttpnetworkrequest_p.h.

Member Enumeration Documentation

◆ Operation

Enumerator
Options 
Get 
Head 
Post 
Put 
Delete 
Trace 
Connect 
Custom 

Definition at line 35 of file qhttpnetworkrequest_p.h.

◆ Priority

Enumerator
HighPriority 
NormalPriority 
LowPriority 

Definition at line 47 of file qhttpnetworkrequest_p.h.

Constructor & Destructor Documentation

◆ QHttpNetworkRequest() [1/2]

QHttpNetworkRequest::QHttpNetworkRequest ( const QUrl url = QUrl(),
Operation  operation = Get,
Priority  priority = NormalPriority 
)
explicit

Definition at line 164 of file qhttpnetworkrequest.cpp.

◆ QHttpNetworkRequest() [2/2]

QHttpNetworkRequest::QHttpNetworkRequest ( const QHttpNetworkRequest other)

Definition at line 169 of file qhttpnetworkrequest.cpp.

◆ ~QHttpNetworkRequest()

QHttpNetworkRequest::~QHttpNetworkRequest ( )
virtual

Definition at line 174 of file qhttpnetworkrequest.cpp.

Member Function Documentation

◆ clearHeaders()

void QHttpNetworkRequest::clearHeaders ( )

Definition at line 260 of file qhttpnetworkrequest.cpp.

References QHttpNetworkHeaderPrivate::clearHeaders().

Referenced by QNetworkReplyHttpImplPrivate::onRedirected().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ contentLength()

qint64 QHttpNetworkRequest::contentLength ( ) const
overridevirtual

Implements QHttpNetworkHeader.

Definition at line 230 of file qhttpnetworkrequest.cpp.

References QHttpNetworkHeaderPrivate::contentLength().

Referenced by QHttpProtocolHandler::sendRequest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ customVerb()

QByteArray QHttpNetworkRequest::customVerb ( ) const

Definition at line 286 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::customVerb.

Referenced by setCustomVerb().

+ Here is the caller graph for this function:

◆ header()

QList< QPair< QByteArray, QByteArray > > QHttpNetworkRequest::header ( ) const
overridevirtual

Implements QHttpNetworkHeader.

Definition at line 240 of file qhttpnetworkrequest.cpp.

References QHttpHeaderParser::headers(), and QHttpNetworkHeaderPrivate::parser.

+ Here is the call graph for this function:

◆ headerField()

QByteArray QHttpNetworkRequest::headerField ( const QByteArray name,
const QByteArray defaultValue = QByteArray() 
) const
overridevirtual

Implements QHttpNetworkHeader.

Definition at line 245 of file qhttpnetworkrequest.cpp.

References QHttpNetworkHeaderPrivate::headerField().

Referenced by QHttpNetworkConnectionChannel::ensureConnection(), and QNetworkReplyHttpImplPrivate::loadFromCacheIfAllowed().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isFollowRedirects()

bool QHttpNetworkRequest::isFollowRedirects ( ) const

Definition at line 205 of file qhttpnetworkrequest.cpp.

References QNetworkRequest::ManualRedirectPolicy, and QHttpNetworkRequestPrivate::redirectPolicy.

Referenced by QHttpThreadDelegate::finishedSlot(), QNetworkReplyHttpImplPrivate::isHttpRedirectResponse(), QHttpNetworkReplyPrivate::isRedirecting(), QNetworkReplyHttpImplPrivate::onRedirected(), and QNetworkReplyHttpImplPrivate::sendCacheContents().

+ Here is the caller graph for this function:

◆ isH2cAllowed()

bool QHttpNetworkRequest::isH2cAllowed ( ) const

Definition at line 336 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::h2cAllowed.

Referenced by QHttpThreadDelegate::startRequest().

+ Here is the caller graph for this function:

◆ isHTTP2Allowed()

bool QHttpNetworkRequest::isHTTP2Allowed ( ) const

Definition at line 316 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::http2Allowed.

Referenced by QHttpThreadDelegate::startRequest().

+ Here is the caller graph for this function:

◆ isHTTP2Direct()

bool QHttpNetworkRequest::isHTTP2Direct ( ) const

Definition at line 326 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::http2Direct.

Referenced by QHttpThreadDelegate::startRequest().

+ Here is the caller graph for this function:

◆ isPipeliningAllowed()

bool QHttpNetworkRequest::isPipeliningAllowed ( ) const

◆ isPreConnect()

bool QHttpNetworkRequest::isPreConnect ( ) const

Definition at line 196 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::preConnect.

◆ isSsl()

bool QHttpNetworkRequest::isSsl ( ) const

Definition at line 187 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::ssl.

Referenced by QHttpNetworkReply::setRequest().

+ Here is the caller graph for this function:

◆ majorVersion()

int QHttpNetworkRequest::majorVersion ( ) const
overridevirtual

Implements QHttpNetworkHeader.

Definition at line 366 of file qhttpnetworkrequest.cpp.

◆ methodName()

QByteArray QHttpNetworkRequest::methodName ( ) const

◆ minorVersion()

int QHttpNetworkRequest::minorVersion ( ) const
overridevirtual

Implements QHttpNetworkHeader.

Definition at line 371 of file qhttpnetworkrequest.cpp.

◆ operation()

QHttpNetworkRequest::Operation QHttpNetworkRequest::operation ( ) const

Definition at line 276 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::operation.

Referenced by QHttpNetworkReplyPrivate::expectContent(), QNetworkReplyHttpImplPrivate::fetchCacheMetaData(), and setOperation().

+ Here is the caller graph for this function:

◆ operator=()

QHttpNetworkRequest & QHttpNetworkRequest::operator= ( const QHttpNetworkRequest other)

Definition at line 265 of file qhttpnetworkrequest.cpp.

References other().

+ Here is the call graph for this function:

◆ operator==()

bool QHttpNetworkRequest::operator== ( const QHttpNetworkRequest other) const

Definition at line 271 of file qhttpnetworkrequest.cpp.

References other().

+ Here is the call graph for this function:

◆ peerVerifyName()

QString QHttpNetworkRequest::peerVerifyName ( ) const

Definition at line 376 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::peerVerifyName.

Referenced by QHttpThreadDelegate::startRequest().

+ Here is the caller graph for this function:

◆ prependHeaderField()

void QHttpNetworkRequest::prependHeaderField ( const QByteArray name,
const QByteArray data 
)

Definition at line 255 of file qhttpnetworkrequest.cpp.

References QHttpNetworkHeaderPrivate::prependHeaderField().

+ Here is the call graph for this function:

◆ priority()

QHttpNetworkRequest::Priority QHttpNetworkRequest::priority ( ) const

Definition at line 296 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::priority.

Referenced by setPriority().

+ Here is the caller graph for this function:

◆ redirectCount()

int QHttpNetworkRequest::redirectCount ( ) const

Definition at line 220 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::redirectCount.

Referenced by QHttpThreadDelegate::finishedSlot(), and QNetworkReplyHttpImplPrivate::sendCacheContents().

+ Here is the caller graph for this function:

◆ redirectPolicy()

QNetworkRequest::RedirectPolicy QHttpNetworkRequest::redirectPolicy ( ) const

Definition at line 215 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::redirectPolicy.

Referenced by QNetworkReplyHttpImplPrivate::onRedirected().

+ Here is the caller graph for this function:

◆ setContentLength()

void QHttpNetworkRequest::setContentLength ( qint64  length)
overridevirtual

Implements QHttpNetworkHeader.

Definition at line 235 of file qhttpnetworkrequest.cpp.

References QHttpNetworkHeaderPrivate::setContentLength().

+ Here is the call graph for this function:

◆ setCustomVerb()

void QHttpNetworkRequest::setCustomVerb ( const QByteArray customOperation)

Definition at line 291 of file qhttpnetworkrequest.cpp.

References customVerb(), and QHttpNetworkRequestPrivate::customVerb.

Referenced by QNetworkReplyHttpImplPrivate::postRequest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setH2cAllowed()

void QHttpNetworkRequest::setH2cAllowed ( bool  b)

Definition at line 341 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::h2cAllowed.

Referenced by QNetworkReplyHttpImplPrivate::postRequest().

+ Here is the caller graph for this function:

◆ setHeaderField()

void QHttpNetworkRequest::setHeaderField ( const QByteArray name,
const QByteArray data 
)
overridevirtual

Implements QHttpNetworkHeader.

Definition at line 250 of file qhttpnetworkrequest.cpp.

References QHttpNetworkHeaderPrivate::setHeaderField().

Referenced by QNetworkReplyHttpImplPrivate::loadFromCacheIfAllowed(), and QNetworkReplyHttpImplPrivate::postRequest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setHTTP2Allowed()

void QHttpNetworkRequest::setHTTP2Allowed ( bool  b)

Definition at line 321 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::http2Allowed.

Referenced by QNetworkReplyHttpImplPrivate::postRequest().

+ Here is the caller graph for this function:

◆ setHTTP2Direct()

void QHttpNetworkRequest::setHTTP2Direct ( bool  b)

Definition at line 331 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::http2Direct.

Referenced by QNetworkReplyHttpImplPrivate::postRequest().

+ Here is the caller graph for this function:

◆ setOperation()

void QHttpNetworkRequest::setOperation ( Operation  operation)

Definition at line 281 of file qhttpnetworkrequest.cpp.

References operation(), and QHttpNetworkRequestPrivate::operation.

Referenced by QNetworkReplyHttpImplPrivate::postRequest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPeerVerifyName()

void QHttpNetworkRequest::setPeerVerifyName ( const QString peerName)

Definition at line 381 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::peerVerifyName.

Referenced by QNetworkReplyHttpImplPrivate::postRequest().

+ Here is the caller graph for this function:

◆ setPipeliningAllowed()

void QHttpNetworkRequest::setPipeliningAllowed ( bool  b)

Definition at line 311 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::pipeliningAllowed.

Referenced by QNetworkReplyHttpImplPrivate::postRequest().

+ Here is the caller graph for this function:

◆ setPreConnect()

void QHttpNetworkRequest::setPreConnect ( bool  preConnect)

Definition at line 200 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::preConnect.

Referenced by QNetworkReplyHttpImplPrivate::postRequest().

+ Here is the caller graph for this function:

◆ setPriority()

void QHttpNetworkRequest::setPriority ( Priority  priority)

Definition at line 301 of file qhttpnetworkrequest.cpp.

References priority(), and QHttpNetworkRequestPrivate::priority.

Referenced by QNetworkReplyHttpImplPrivate::postRequest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setRedirectCount()

void QHttpNetworkRequest::setRedirectCount ( int  count)

Definition at line 225 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::redirectCount.

Referenced by QNetworkReplyHttpImplPrivate::postRequest().

+ Here is the caller graph for this function:

◆ setRedirectPolicy()

void QHttpNetworkRequest::setRedirectPolicy ( QNetworkRequest::RedirectPolicy  policy)

Definition at line 210 of file qhttpnetworkrequest.cpp.

References policy, and QHttpNetworkRequestPrivate::redirectPolicy.

Referenced by QNetworkReplyHttpImplPrivate::postRequest().

+ Here is the caller graph for this function:

◆ setSsl()

void QHttpNetworkRequest::setSsl ( bool  s)

Definition at line 191 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::ssl.

Referenced by QNetworkReplyHttpImplPrivate::postRequest().

+ Here is the caller graph for this function:

◆ setUploadByteDevice()

void QHttpNetworkRequest::setUploadByteDevice ( QNonContiguousByteDevice bd)

Definition at line 356 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::uploadByteDevice.

Referenced by QNetworkReplyHttpImplPrivate::postRequest().

+ Here is the caller graph for this function:

◆ setUrl()

void QHttpNetworkRequest::setUrl ( const QUrl url)
overridevirtual

Implements QHttpNetworkHeader.

Definition at line 182 of file qhttpnetworkrequest.cpp.

References QHttpNetworkHeaderPrivate::url, and url().

Referenced by QNetworkReplyHttpImplPrivate::postRequest(), and QHttpProtocolHandler::sendRequest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setWithCredentials()

void QHttpNetworkRequest::setWithCredentials ( bool  b)

Definition at line 351 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::withCredentials.

Referenced by QNetworkReplyHttpImplPrivate::postRequest().

+ Here is the caller graph for this function:

◆ uploadByteDevice()

QNonContiguousByteDevice * QHttpNetworkRequest::uploadByteDevice ( ) const

Definition at line 361 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::uploadByteDevice.

Referenced by QHttpNetworkConnectionChannel::resetUploadData(), and QHttpProtocolHandler::sendRequest().

+ Here is the caller graph for this function:

◆ uri()

QByteArray QHttpNetworkRequest::uri ( bool  throughProxy) const

Definition at line 94 of file qhttpnetworkrequest.cpp.

References copy(), QUrl::FullyEncoded, QUrl::NormalizePathSegments, QHttpNetworkRequestPrivate::operation, Post, QStringLiteral, QUrl::RemoveAuthority, QUrl::RemoveFragment, QUrl::RemoveQuery, QUrl::RemoveScheme, QUrl::RemoveUserInfo, QHttpNetworkRequestPrivate::uploadByteDevice, uri(), and QHttpNetworkHeaderPrivate::url.

Referenced by uri().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ url()

◆ withCredentials()

bool QHttpNetworkRequest::withCredentials ( ) const

Definition at line 346 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::withCredentials.

Referenced by QHttpProtocolHandler::sendRequest(), and QHttpThreadDelegate::startRequest().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ QHttp2ProtocolHandler

friend class QHttp2ProtocolHandler
friend

Definition at line 126 of file qhttpnetworkrequest_p.h.

◆ QHttpNetworkConnectionChannel

friend class QHttpNetworkConnectionChannel
friend

Definition at line 124 of file qhttpnetworkrequest_p.h.

◆ QHttpNetworkConnectionPrivate

friend class QHttpNetworkConnectionPrivate
friend

Definition at line 123 of file qhttpnetworkrequest_p.h.

◆ QHttpNetworkRequestPrivate

friend class QHttpNetworkRequestPrivate
friend

Definition at line 122 of file qhttpnetworkrequest_p.h.

◆ QHttpProtocolHandler

friend class QHttpProtocolHandler
friend

Definition at line 125 of file qhttpnetworkrequest_p.h.

◆ QSpdyProtocolHandler

friend class QSpdyProtocolHandler
friend

Definition at line 127 of file qhttpnetworkrequest_p.h.


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