Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qnetworkrequest.cpp File Reference

(f0fcd396c57107a8fb4bca12a014107b6b09f5d0)

#include "qnetworkrequest.h"
#include "qnetworkrequest_p.h"
#include "qplatformdefs.h"
#include "qnetworkcookie.h"
#include "qsslconfiguration.h"
#include "qhttpheadershelper_p.h"
#include "QtCore/qdatetime.h"
#include "QtCore/qlocale.h"
#include "QtCore/qshareddata.h"
#include "QtCore/qtimezone.h"
#include "QtCore/private/qduplicatetracker_p.h"
#include "QtCore/private/qtools_p.h"
#include <ctype.h>
#include <algorithm>
#include <q20algorithm.h>
#include "moc_qnetworkrequest.cpp"
Include dependency graph for qnetworkrequest.cpp:

Go to the source code of this file.

Classes

class  QNetworkRequestPrivate
 \variable QNetworkRequest::DefaultTransferTimeout More...

Functions

static std::optional< QNetworkRequest::KnownHeaderstoKnownHeader (QHttpHeaders::WellKnownHeader key)
static std::optional< QHttpHeaders::WellKnownHeadertoWellKnownHeader (QNetworkRequest::KnownHeaders key)
static QByteArray makeCookieHeader (const QList< QNetworkCookie > &cookies, QNetworkCookie::RawForm type, QByteArrayView separator)
static QByteArray makeCookieHeader (const QVariant &value, QNetworkCookie::RawForm type, QByteArrayView separator)
static QByteArray headerValue (QNetworkRequest::KnownHeaders header, const QVariant &value)
static int parseHeaderName (QByteArrayView headerName)
static QVariant parseHttpDate (QByteArrayView raw)
static QList< QNetworkCookieparseCookieHeader (QByteArrayView raw)
static QVariant parseETag (QByteArrayView raw)
template<typename T>
static QStringList parseMatchImpl (QByteArrayView raw, T op)
static QStringList parseIfMatch (QByteArrayView raw)
static QStringList parseIfNoneMatch (QByteArrayView raw)
static QVariant parseHeaderValue (QNetworkRequest::KnownHeaders header, QByteArrayView value)
static QVariant parseHeaderValue (QNetworkRequest::KnownHeaders header, QList< QByteArray > values)
static bool isSetCookie (QByteArrayView name)
static bool isSetCookie (QHttpHeaders::WellKnownHeader name)
template<class HeaderName>
static void setFromRawHeader (QHttpHeaders &headers, HeaderName header, QByteArrayView value)
static int name_to_month (const char *month_str)

Variables

static constexpr HeaderPair knownHeadersArr []

Function Documentation

◆ headerValue()

QByteArray headerValue ( QNetworkRequest::KnownHeaders header,
const QVariant & value )
static

Definition at line 1180 of file qnetworkrequest.cpp.

◆ isSetCookie() [1/2]

bool isSetCookie ( QByteArrayView name)
static

Definition at line 1434 of file qnetworkrequest.cpp.

◆ isSetCookie() [2/2]

bool isSetCookie ( QHttpHeaders::WellKnownHeader name)
static

Definition at line 1440 of file qnetworkrequest.cpp.

◆ makeCookieHeader() [1/2]

QByteArray makeCookieHeader ( const QList< QNetworkCookie > & cookies,
QNetworkCookie::RawForm type,
QByteArrayView separator )
static

Definition at line 1157 of file qnetworkrequest.cpp.

◆ makeCookieHeader() [2/2]

QByteArray makeCookieHeader ( const QVariant & value,
QNetworkCookie::RawForm type,
QByteArrayView separator )
static

Definition at line 1171 of file qnetworkrequest.cpp.

◆ name_to_month()

int name_to_month ( const char * month_str)
static

Definition at line 1620 of file qnetworkrequest.cpp.

◆ parseCookieHeader()

QList< QNetworkCookie > parseCookieHeader ( QByteArrayView raw)
static

Definition at line 1292 of file qnetworkrequest.cpp.

◆ parseETag()

QVariant parseETag ( QByteArrayView raw)
static

Definition at line 1306 of file qnetworkrequest.cpp.

◆ parseHeaderName()

int parseHeaderName ( QByteArrayView headerName)
static

Definition at line 1226 of file qnetworkrequest.cpp.

◆ parseHeaderValue() [1/2]

QVariant parseHeaderValue ( QNetworkRequest::KnownHeaders header,
QByteArrayView value )
static

Definition at line 1349 of file qnetworkrequest.cpp.

◆ parseHeaderValue() [2/2]

QVariant parseHeaderValue ( QNetworkRequest::KnownHeaders header,
QList< QByteArray > values )
static

Definition at line 1399 of file qnetworkrequest.cpp.

◆ parseHttpDate()

QVariant parseHttpDate ( QByteArrayView raw)
static

Definition at line 1284 of file qnetworkrequest.cpp.

◆ parseIfMatch()

QStringList parseIfMatch ( QByteArrayView raw)
static

Definition at line 1334 of file qnetworkrequest.cpp.

◆ parseIfNoneMatch()

QStringList parseIfNoneMatch ( QByteArrayView raw)
static

Definition at line 1341 of file qnetworkrequest.cpp.

◆ parseMatchImpl()

template<typename T>
QStringList parseMatchImpl ( QByteArrayView raw,
T op )
static

Definition at line 1319 of file qnetworkrequest.cpp.

◆ setFromRawHeader()

template<class HeaderName>
void setFromRawHeader ( QHttpHeaders & headers,
HeaderName header,
QByteArrayView value )
static

Definition at line 1446 of file qnetworkrequest.cpp.

◆ toKnownHeader()

std::optional< QNetworkRequest::KnownHeaders > toKnownHeader ( QHttpHeaders::WellKnownHeader key)
static

Definition at line 1140 of file qnetworkrequest.cpp.

References knownHeadersArr.

◆ toWellKnownHeader()

std::optional< QHttpHeaders::WellKnownHeader > toWellKnownHeader ( QNetworkRequest::KnownHeaders key)
static

Definition at line 1148 of file qnetworkrequest.cpp.

References knownHeadersArr.

Variable Documentation

◆ knownHeadersArr

constexpr HeaderPair knownHeadersArr
staticconstexpr
Initial value:
= {
}

Definition at line 1121 of file qnetworkrequest.cpp.

Referenced by toKnownHeader(), and toWellKnownHeader().