Qt 6.x
The Qt SDK
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
21#include <qshareddata.h>
22#include <qurl.h>
23
24#ifndef Q_OS_WASM
26#endif
27
29
31{
32public:
34 virtual QUrl url() const = 0;
35 virtual void setUrl(const QUrl &url) = 0;
36
37 virtual int majorVersion() const = 0;
38 virtual int minorVersion() const = 0;
39
40 virtual qint64 contentLength() const = 0;
41 virtual void setContentLength(qint64 length) = 0;
42
44 virtual QByteArray headerField(const QByteArray &name, const QByteArray &defaultValue = QByteArray()) const = 0;
45 virtual void setHeaderField(const QByteArray &name, const QByteArray &data) = 0;
46};
47
49{
50public:
53
54 QHttpNetworkHeaderPrivate(const QUrl &newUrl = QUrl());
56 qint64 contentLength() const;
57 void setContentLength(qint64 length);
58
59 QByteArray headerField(const QByteArray &name, const QByteArray &defaultValue = QByteArray()) const;
60 QList<QByteArray> headerFieldValues(const QByteArray &name) const;
61 void setHeaderField(const QByteArray &name, const QByteArray &data);
62 void prependHeaderField(const QByteArray &name, const QByteArray &data);
63 void clearHeaders();
66
67};
68
69
71
72#endif // QHTTPNETWORKHEADER_H
73
74
75
76
77
78
\inmodule QtCore
Definition qbytearray.h:57
QHttpNetworkHeaderPrivate(const QHttpNetworkHeaderPrivate &other)=default
virtual qint64 contentLength() const =0
virtual QByteArray headerField(const QByteArray &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 QList< QPair< QByteArray, QByteArray > > header() const =0
virtual void setUrl(const QUrl &url)=0
virtual QUrl url() const =0
Definition qlist.h:74
\inmodule QtCore
Definition qshareddata.h:19
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
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:1219
#define Q_AUTOTEST_EXPORT
#define QT_REQUIRE_CONFIG(feature)
long long qint64
Definition qtypes.h:55
QUrl url("example.com")
[constructor-url-reference]
QSharedPointer< T > other(t)
[5]