43 #include "private/qnoncontiguousbytedevice_p.h" 52 autoDecompress(false), pipeliningAllowed(false), withCredentials(true)
143 ba += request.
d->
uri(throughProxy);
153 for (; it != endIt; ++
it) {
165 qWarning(
"content-type missing in HTTP POST, defaulting to application/x-www-form-urlencoded. Use QNetworkRequest::setHeader() to fix this problem.");
166 ba +=
"Content-Type: application/x-www-form-urlencoded\r\n";
170 ba +=
"Content-Length: ";
251 return d->operator==(*other.
d);
QSharedDataPointer< QHttpNetworkRequestPrivate > d
#define QT_END_NAMESPACE
This macro expands to.
QHttpNetworkRequestPrivate(QHttpNetworkRequest::Operation op, QHttpNetworkRequest::Priority pri, const QUrl &newUrl=QUrl())
void setPriority(Priority priority)
QHttpNetworkRequest(const QUrl &url=QUrl(), Operation operation=Get, Priority priority=NormalPriority)
#define it(className, varName)
The QByteArray class provides an array of bytes.
QByteArray methodName() const
void setOperation(Operation operation)
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the list.
bool operator==(const QHttpNetworkRequest &other) const
void setPipeliningAllowed(bool b)
The QUrl class provides a convenient interface for working with URLs.
bool hasQuery() const
Returns true if this URL contains a Query (i.
QString path() const
Returns the path of the URL.
QList< QPair< QByteArray, QByteArray > > header() const
QNonContiguousByteDevice * uploadByteDevice() const
Priority priority() const
#define QT_BEGIN_NAMESPACE
This macro expands to.
QByteArray headerField(const QByteArray &name, const QByteArray &defaultValue=QByteArray()) const
void setUrl(const QUrl &url)
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Q_CORE_EXPORT void qWarning(const char *,...)
QHttpNetworkRequest::Operation operation
static const char * data(const QByteArray &arr)
QByteArray customVerb() const
void setWithCredentials(bool b)
Operation operation() const
qint64 contentLength() const
QByteArray toEncoded(FormattingOptions options=None) const
Returns the encoded representation of the URL if it's valid; otherwise an empty QByteArray is returne...
T & first()
Returns a reference to the first item in the list.
QHttpNetworkRequest::Priority priority
void setContentLength(qint64 length)
static QByteArray header(const QHttpNetworkRequest &request, bool throughProxy)
bool withCredentials() const
~QHttpNetworkRequestPrivate()
int length() const
This function is identical to count().
int size() const
Returns the number of bytes in this byte array.
bool operator==(const QHttpNetworkRequestPrivate &other) const
QByteArray uri(bool throughProxy) const
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
A QNonContiguousByteDevice is a representation of a file, array or buffer that allows access with a r...
void setHeaderField(const QByteArray &name, const QByteArray &data)
QHttpNetworkRequest & operator=(const QHttpNetworkRequest &other)
bool isPipeliningAllowed() const
void reserve(int size)
Attempts to allocate memory for at least size bytes.
QNonContiguousByteDevice * uploadByteDevice
virtual ~QHttpNetworkRequest()
void setCustomVerb(const QByteArray &customOperation)
static QByteArray number(int, int base=10)
Returns a byte array containing the string equivalent of the number n to base base (10 by default)...
QByteArray encodedQuery() const
Returns the query string of the URL in percent encoded form.
The QList class is a template class that provides lists.
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the list...
void setUploadByteDevice(QNonContiguousByteDevice *bd)