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
qhttpnetworkheader_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QHTTPNETWORKHEADER_H
5#define QHTTPNETWORKHEADER_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of the Network Access API. This header file may change from
13// version to version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtNetwork/private/qtnetworkglobal_p.h>
19#include <QtNetwork/private/qhttpheaderparser_p.h>
20#include <QtNetwork/qhttpheaders.h>
21
22#include <qshareddata.h>
23#include <qurl.h>
24
25#ifndef Q_OS_WASM
27#endif
28
30
32{
33public:
35 virtual QUrl url() const = 0;
36 virtual void setUrl(const QUrl &url) = 0;
37
38 virtual int majorVersion() const = 0;
39 virtual int minorVersion() const = 0;
40
41 virtual qint64 contentLength() const = 0;
42 virtual void setContentLength(qint64 length) = 0;
43
44 virtual QHttpHeaders header() const = 0;
45 virtual QByteArray headerField(QByteArrayView name, const QByteArray &defaultValue = QByteArray()) const = 0;
46 virtual void setHeaderField(const QByteArray &name, const QByteArray &data) = 0;
47};
48
50{
51public:
54
55 QHttpNetworkHeaderPrivate(const QUrl &newUrl = QUrl());
57 qint64 contentLength() const;
58 void setContentLength(qint64 length);
59
60 QByteArray headerField(QByteArrayView name, const QByteArray &defaultValue = QByteArray()) const;
61 QList<QByteArray> headerFieldValues(QByteArrayView name) const;
62 void setHeaderField(const QByteArray &name, const QByteArray &data);
63 void prependHeaderField(const QByteArray &name, const QByteArray &data);
64 void clearHeaders();
65 QHttpHeaders headers() const;
67
68};
69
70
72
73#endif // QHTTPNETWORKHEADER_H
74
75
76
77
78
79
\inmodule QtCore
Definition qbytearray.h:57
QHttpNetworkHeaderPrivate(const QHttpNetworkHeaderPrivate &other)=default
virtual qint64 contentLength() const =0
virtual QByteArray headerField(QByteArrayView name, const QByteArray &defaultValue=QByteArray()) const =0
virtual void setHeaderField(const QByteArray &name, const QByteArray &data)=0
virtual void setContentLength(qint64 length)=0
virtual int minorVersion() const =0
virtual int majorVersion() const =0
virtual void setUrl(const QUrl &url)=0
virtual QHttpHeaders header() const =0
virtual QUrl url() const =0
\inmodule QtCore
Definition qshareddata.h:19
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
GLenum GLuint GLenum GLsizei length
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint name
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
Definition qrandom.cpp:1220
#define Q_AUTOTEST_EXPORT
#define QT_REQUIRE_CONFIG(feature)
long long qint64
Definition qtypes.h:60
QUrl url("example.com")
[constructor-url-reference]
QSharedPointer< T > other(t)
[5]