#include "qplatformdefs.h"
#include "qnetworkrequest.h"
#include "qnetworkcookie.h"
#include "qnetworkrequest_p.h"
#include "qsslconfiguration.h"
#include "QtCore/qshareddata.h"
#include "QtCore/qlocale.h"
#include "QtCore/qdatetime.h"
#include <ctype.h>
#include <stdio.h>
Go to the source code of this file.
◆ headerName()
◆ headerValue()
Definition at line 685 of file qnetworkrequest.cpp.
Referenced by QHttpPart::operator!=(), and QNetworkHeadersPrivate::setCookedHeader().
694 switch (value.
type()) {
703 switch (value.
type()) {
715 if (cookies.
isEmpty() && value.
userType() == qMetaTypeId<QNetworkCookie>())
716 cookies << qvariant_cast<QNetworkCookie>(value);
731 if (cookies.
isEmpty() && value.
userType() == qMetaTypeId<QNetworkCookie>())
732 cookies << qvariant_cast<QNetworkCookie>(value);
The QByteArray class provides an array of bytes.
QDateTime toDateTime() const
Returns the variant as a QDateTime if the variant has type() DateTime , Date , or String ; otherwise ...
QByteArray toByteArray() const
Returns the variant as a QByteArray if the variant has type() ByteArray or String (converted using QS...
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
QByteArray toRawForm(RawForm form=Full) const
Returns the raw form of this QNetworkCookie.
QUrl toUrl() const
Returns the variant as a QUrl if the variant has type() Url ; otherwise returns an invalid QUrl...
QByteArray toEncoded(FormattingOptions options=None) const
Returns the encoded representation of the URL if it's valid; otherwise an empty QByteArray is returne...
The QNetworkCookie class holds one network cookie.
int userType() const
Returns the storage type of the value stored in the variant.
Type type() const
Returns the storage type of the value stored in the variant.
T qvariant_cast(const QVariant &value)
Returns the given value converted to the template type T.
◆ name_to_month()
static int name_to_month |
( |
const char * |
month_str | ) |
|
|
static |
◆ parseCookieHeader()
Definition at line 788 of file qnetworkrequest.cpp.
Referenced by parseHeaderValue().
792 foreach (
const QByteArray &cookie, cookieList) {
794 if (parsed.
count() != 1)
The QVariant class acts like a union for the most common Qt data types.
The QByteArray class provides an array of bytes.
int count(const T &t) const
Returns the number of occurrences of value in the list.
static QList< QNetworkCookie > parseCookies(const QByteArray &cookieString)
Parses the cookie string cookieString as received from a server response in the "Set-Cookie:" header...
QByteArray trimmed() const
Returns a byte array that has whitespace removed from the start and the end.
static QVariant fromValue(const T &value)
Returns a QVariant containing a copy of value.
QList< QByteArray > split(char sep) const
Splits the byte array into subarrays wherever sep occurs, and returns the list of those arrays...
◆ parseHeaderName()
Definition at line 749 of file qnetworkrequest.cpp.
Referenced by QNetworkHeadersPrivate::parseAndSetHeader().
754 switch (tolower(headerName.
at(0))) {
KnownHeaders
List of known header types that QNetworkRequest parses.
int qstricmp(const char *str1, const char *str2)
A safe stricmp() function.
const char * constData() const
Returns a pointer to the data stored in the byte array.
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
char at(int i) const
Returns the character at index position i in the byte array.
◆ parseHeaderValue()
Definition at line 803 of file qnetworkrequest.cpp.
Referenced by QNetworkHeadersPrivate::parseAndSetHeader().
The QVariant class acts like a union for the most common Qt data types.
bool isValid() const
Returns true if the URL is valid; otherwise returns false.
qlonglong toLongLong(bool *ok=0, int base=10) const
Returns the byte array converted to a {long long} using base base, which is 10 by default and must be...
The QUrl class provides a convenient interface for working with URLs.
static QVariant parseCookieHeader(const QByteArray &raw)
static QList< QNetworkCookie > parseCookies(const QByteArray &cookieString)
Parses the cookie string cookieString as received from a server response in the "Set-Cookie:" header...
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QByteArray trimmed() const
Returns a byte array that has whitespace removed from the start and the end.
static QVariant fromValue(const T &value)
Returns a QVariant containing a copy of value.
static QVariant parseHttpDate(const QByteArray &raw)
QString scheme() const
Returns the scheme of the URL.
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
static QUrl fromEncoded(const QByteArray &url)
Parses input and returns the corresponding QUrl.
◆ parseHttpDate()
Definition at line 780 of file qnetworkrequest.cpp.
Referenced by parseHeaderValue().
The QVariant class acts like a union for the most common Qt data types.
bool isValid() const
Returns true if both the date and the time are valid; otherwise returns false.
The QDateTime class provides date and time functions.