Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
 
QHttpHeaders header () const override
 
QByteArray headerField (QByteArrayView 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 ()
 

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 162 of file qhttpnetworkrequest.cpp.

◆ QHttpNetworkRequest() [2/2]

QHttpNetworkRequest::QHttpNetworkRequest ( const QHttpNetworkRequest & other)

Definition at line 167 of file qhttpnetworkrequest.cpp.

◆ ~QHttpNetworkRequest()

QHttpNetworkRequest::~QHttpNetworkRequest ( )
virtual

Definition at line 172 of file qhttpnetworkrequest.cpp.

Member Function Documentation

◆ clearHeaders()

void QHttpNetworkRequest::clearHeaders ( )

Definition at line 258 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 228 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 284 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::customVerb.

Referenced by setCustomVerb().

+ Here is the caller graph for this function:

◆ header()

QHttpHeaders QHttpNetworkRequest::header ( ) const
overridevirtual

Implements QHttpNetworkHeader.

Definition at line 238 of file qhttpnetworkrequest.cpp.

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

+ Here is the call graph for this function:

◆ headerField()

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

Implements QHttpNetworkHeader.

Definition at line 243 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 203 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 334 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 314 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 324 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 194 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::preConnect.

Referenced by QHttpProtocolHandler::sendRequest().

+ Here is the caller graph for this function:

◆ isSsl()

bool QHttpNetworkRequest::isSsl ( ) const

Definition at line 185 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 364 of file qhttpnetworkrequest.cpp.

◆ methodName()

QByteArray QHttpNetworkRequest::methodName ( ) const

Definition at line 67 of file qhttpnetworkrequest.cpp.

References Connect, Custom, QHttpNetworkRequestPrivate::customVerb, Delete, Get, Head, QHttpNetworkRequestPrivate::operation, Options, Post, Put, QByteArray(), and Trace.

+ Here is the call graph for this function:

◆ minorVersion()

int QHttpNetworkRequest::minorVersion ( ) const
overridevirtual

Implements QHttpNetworkHeader.

Definition at line 369 of file qhttpnetworkrequest.cpp.

◆ operation()

QHttpNetworkRequest::Operation QHttpNetworkRequest::operation ( ) const

Definition at line 274 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 263 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 269 of file qhttpnetworkrequest.cpp.

References other().

+ Here is the call graph for this function:

◆ peerVerifyName()

QString QHttpNetworkRequest::peerVerifyName ( ) const

Definition at line 374 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 253 of file qhttpnetworkrequest.cpp.

References QHttpNetworkHeaderPrivate::prependHeaderField().

+ Here is the call graph for this function:

◆ priority()

QHttpNetworkRequest::Priority QHttpNetworkRequest::priority ( ) const

Definition at line 294 of file qhttpnetworkrequest.cpp.

References QHttpNetworkRequestPrivate::priority.

Referenced by Http2::Stream::priority(), and setPriority().

+ Here is the caller graph for this function:

◆ redirectCount()

int QHttpNetworkRequest::redirectCount ( ) const

Definition at line 218 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 213 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 233 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 289 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 339 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 248 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 319 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 329 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 279 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 379 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 309 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 198 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 299 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 223 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 208 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 189 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 354 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 180 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 349 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 359 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 344 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: