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
qhttpnetworkrequest_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 QHTTPNETWORKREQUEST_H
5#define QHTTPNETWORKREQUEST_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#include <QtNetwork/private/qtnetworkglobal_p.h>
18
19#include <private/qhttpnetworkheader_p.h>
20#include <QtNetwork/qnetworkrequest.h>
21#include <qmetatype.h>
22
23#ifndef Q_OS_WASM
25#endif
26
28
30
33{
34public:
46
47 enum Priority {
50 LowPriority
51 };
52
53 explicit QHttpNetworkRequest(const QUrl &url = QUrl(), Operation operation = Get, Priority priority = NormalPriority);
55 virtual ~QHttpNetworkRequest();
57 bool operator==(const QHttpNetworkRequest &other) const;
58
59 QUrl url() const override;
60 void setUrl(const QUrl &url) override;
61
62 int majorVersion() const override;
63 int minorVersion() const override;
64
65 qint64 contentLength() const override;
66 void setContentLength(qint64 length) override;
67
68 QHttpHeaders header() const override;
69 QByteArray headerField(QByteArrayView name, const QByteArray &defaultValue = QByteArray()) const override;
70 void setHeaderField(const QByteArray &name, const QByteArray &data) override;
71 void prependHeaderField(const QByteArray &name, const QByteArray &data);
72 void clearHeaders();
73
74 Operation operation() const;
75 void setOperation(Operation operation);
76
77 QByteArray customVerb() const;
78 void setCustomVerb(const QByteArray &customOperation);
79
80 Priority priority() const;
81 void setPriority(Priority priority);
82
83 bool isPipeliningAllowed() const;
84 void setPipeliningAllowed(bool b);
85
86 bool isHTTP2Allowed() const;
87 void setHTTP2Allowed(bool b);
88
89 bool isHTTP2Direct() const;
90 void setHTTP2Direct(bool b);
91
92 bool isH2cAllowed() const;
93 void setH2cAllowed(bool b);
94
95 bool withCredentials() const;
96 void setWithCredentials(bool b);
97
98 bool isSsl() const;
99 void setSsl(bool);
100
101 bool isPreConnect() const;
102 void setPreConnect(bool preConnect);
103
104 bool isFollowRedirects() const;
105 void setRedirectPolicy(QNetworkRequest::RedirectPolicy policy);
106 QNetworkRequest::RedirectPolicy redirectPolicy() const;
107
108 int redirectCount() const;
109 void setRedirectCount(int count);
110
111 void setUploadByteDevice(QNonContiguousByteDevice *bd);
112 QNonContiguousByteDevice* uploadByteDevice() const;
113
114 QByteArray methodName() const;
115 QByteArray uri(bool throughProxy) const;
116
117 QString peerVerifyName() const;
118 void setPeerVerifyName(const QString &peerName);
119
120private:
121 QSharedDataPointer<QHttpNetworkRequestPrivate> d;
127 friend class QSpdyProtocolHandler;
128};
129
158
159
161
163
164#endif // QHTTPNETWORKREQUEST_H
\inmodule QtCore
Definition qbytearray.h:57
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
bool operator==(const QHttpNetworkRequestPrivate &other) const
QHttpNetworkRequestPrivate(QHttpNetworkRequest::Operation op, QHttpNetworkRequest::Priority pri, const QUrl &newUrl=QUrl())
QHttpNetworkRequest::Priority priority
QNonContiguousByteDevice * uploadByteDevice
QNetworkRequest::RedirectPolicy redirectPolicy
QHttpNetworkRequest::Operation operation
static QByteArray header(const QHttpNetworkRequest &request, bool throughProxy)
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
myinstance setPriority(MyClass::VeryHigh)
Combined button and popup list for selecting options.
static QString methodName(const QDBusIntrospection::Method &method)
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
#define QT_DECL_METATYPE_EXTERN(TYPE, EXPORT)
Definition qmetatype.h:1388
GLboolean GLboolean GLboolean b
GLenum GLuint GLenum GLsizei length
GLenum GLenum GLsizei count
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]
QSizePolicy policy
QNetworkRequest request(url)