5#include "private/qnoncontiguousbytedevice_p.h"
14 autoDecompress(
false), pipeliningAllowed(
false), http2Allowed(true),
15 http2Direct(
false), withCredentials(true), preConnect(
false), redirectCount(0),
22 operation(
other.operation),
23 customVerb(
other.customVerb),
24 priority(
other.priority),
25 uploadByteDevice(
other.uploadByteDevice),
26 autoDecompress(
other.autoDecompress),
27 pipeliningAllowed(
other.pipeliningAllowed),
28 http2Allowed(
other.http2Allowed),
29 http2Direct(
other.http2Direct),
30 h2cAllowed(
other.h2cAllowed),
31 withCredentials(
other.withCredentials),
33 preConnect(
other.preConnect),
34 needResendWithCredentials(
other.needResendWithCredentials),
35 redirectCount(
other.redirectCount),
36 redirectPolicy(
other.redirectPolicy),
37 peerVerifyName(
other.peerVerifyName)
105 if (
copy.path().isEmpty())
131 for (;
it != endIt; ++
it) {
143 qWarning(
"content-type missing in HTTP POST, defaulting to application/x-www-form-urlencoded. Use QNetworkRequest::setHeader() to fix this problem.");
144 ba +=
"Content-Type: application/x-www-form-urlencoded\r\n";
148 ba +=
"Content-Length: ";
273 return d->operator==(*
other.d);
void reserve(qsizetype size)
Attempts to allocate memory for at least size bytes.
static QByteArray number(int, int base=10)
Returns a byte-array representing the whole number n as text.
~QHttpNetworkRequestPrivate()
bool operator==(const QHttpNetworkRequestPrivate &other) const
QHttpNetworkRequestPrivate(QHttpNetworkRequest::Operation op, QHttpNetworkRequest::Priority pri, const QUrl &newUrl=QUrl())
QHttpNetworkRequest::Priority priority
QNonContiguousByteDevice * uploadByteDevice
QNetworkRequest::RedirectPolicy redirectPolicy
bool needResendWithCredentials
QHttpNetworkRequest::Operation operation
static QByteArray header(const QHttpNetworkRequest &request, bool throughProxy)
void setPipeliningAllowed(bool b)
virtual ~QHttpNetworkRequest()
QList< QPair< QByteArray, QByteArray > > header() const override
bool isH2cAllowed() const
void setCustomVerb(const QByteArray &customOperation)
bool isFollowRedirects() const
QHttpNetworkRequest(const QUrl &url=QUrl(), Operation operation=Get, Priority priority=NormalPriority)
int majorVersion() const override
bool operator==(const QHttpNetworkRequest &other) const
void setPriority(Priority priority)
QByteArray methodName() const
int minorVersion() const override
bool isPipeliningAllowed() const
void setPreConnect(bool preConnect)
bool isHTTP2Direct() const
void setRedirectPolicy(QNetworkRequest::RedirectPolicy policy)
Priority priority() const
bool isPreConnect() const
void setWithCredentials(bool b)
void setPeerVerifyName(const QString &peerName)
void setHeaderField(const QByteArray &name, const QByteArray &data) override
QHttpNetworkRequest & operator=(const QHttpNetworkRequest &other)
void setUrl(const QUrl &url) override
QByteArray customVerb() const
bool withCredentials() const
void setH2cAllowed(bool b)
QUrl url() const override
void setContentLength(qint64 length) override
void setHTTP2Allowed(bool b)
QByteArray uri(bool throughProxy) const
void setHTTP2Direct(bool b)
QNonContiguousByteDevice * uploadByteDevice() const
void setOperation(Operation operation)
QString peerVerifyName() const
Operation operation() const
QByteArray headerField(const QByteArray &name, const QByteArray &defaultValue=QByteArray()) const override
void prependHeaderField(const QByteArray &name, const QByteArray &data)
qint64 contentLength() const override
bool isHTTP2Allowed() const
void setRedirectCount(int count)
int redirectCount() const
QNetworkRequest::RedirectPolicy redirectPolicy() const
void setUploadByteDevice(QNonContiguousByteDevice *bd)
qsizetype size() const noexcept
const_iterator constBegin() const noexcept
const_iterator constEnd() const noexcept
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
QVariant header(KnownHeaders header) const
Returns the value of the known network header header if it is present in this request.
\macro QT_RESTRICTED_CAST_FROM_ASCII
QByteArray toLatin1() const &
QString query(ComponentFormattingOptions=PrettyDecoded) const
Returns the query string of the URL if there's a query string, or an empty result if not.
QSet< QString >::iterator it
Combined button and popup list for selecting options.
static jboolean copy(JNIEnv *, jobject)
GLboolean GLboolean GLboolean b
GLenum GLuint GLenum GLsizei length
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLsizei GLsizei GLenum format
#define QStringLiteral(str)
QUrl url("example.com")
[constructor-url-reference]
QNetworkRequest request(url)