1 | // Copyright (C) 2023 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 QNETWORKREQUESTFACTORY_P_H |
5 | #define QNETWORKREQUESTFACTORY_P_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 framework. 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/qhttpheaders.h> |
19 | #include <QtNetwork/qnetworkrequest.h> |
20 | #if QT_CONFIG(ssl) |
21 | #include <QtNetwork/qsslconfiguration.h> |
22 | #endif |
23 | #include <QtCore/qhash.h> |
24 | #include <QtCore/qshareddata.h> |
25 | #include <QtCore/qurl.h> |
26 | #include <QtCore/qurlquery.h> |
27 | #include <QtCore/qvariant.h> |
28 | |
29 | QT_BEGIN_NAMESPACE |
30 | |
31 | class QNetworkRequestFactoryPrivate : public QSharedData |
32 | { |
33 | public: |
34 | QNetworkRequestFactoryPrivate(); |
35 | explicit QNetworkRequestFactoryPrivate(const QUrl &baseUrl); |
36 | ~QNetworkRequestFactoryPrivate(); |
37 | QNetworkRequest newRequest(const QUrl &url) const; |
38 | QUrl requestUrl(const QString *path = nullptr, const QUrlQuery *query = nullptr) const; |
39 | |
40 | #if QT_CONFIG(ssl) |
41 | QSslConfiguration sslConfig; |
42 | #endif |
43 | QUrl baseUrl; |
44 | QHttpHeaders headers; |
45 | QByteArray bearerToken; |
46 | QString userName; |
47 | QString password; |
48 | QUrlQuery queryParameters; |
49 | QNetworkRequest::Priority priority = QNetworkRequest::NormalPriority; |
50 | std::chrono::milliseconds transferTimeout{0}; |
51 | QHash<QNetworkRequest::Attribute, QVariant> attributes; |
52 | }; |
53 | |
54 | QT_END_NAMESPACE |
55 | |
56 | #endif // QNETWORKREQUESTFACTORY_P_H |
57 |