summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkrequestfactory_p.h
blob: 4116669f21565569dcfdcf96a40d21316ccea2a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#ifndef QNETWORKREQUESTFACTORY_P_H
#define QNETWORKREQUESTFACTORY_P_H

//
//  W A R N I N G
//  -------------
//
// This file is not part of the Qt API.  It exists for the convenience
// of the Network Access framework.  This header file may change from
// version to version without notice, or even be removed.
//
// We mean it.
//

#include <QtNetwork/qhttpheaders.h>
#include <QtNetwork/qnetworkrequest.h>
#if QT_CONFIG(ssl)
#include <QtNetwork/qsslconfiguration.h>
#endif
#include <QtCore/qhash.h>
#include <QtCore/qshareddata.h>
#include <QtCore/qurl.h>
#include <QtCore/qurlquery.h>
#include <QtCore/qvariant.h>

QT_BEGIN_NAMESPACE

class QNetworkRequestFactoryPrivate : public QSharedData
{
public:
    QNetworkRequestFactoryPrivate();
    explicit QNetworkRequestFactoryPrivate(const QUrl &baseUrl);
    ~QNetworkRequestFactoryPrivate();
    QNetworkRequest newRequest(const QUrl &url) const;
    QUrl requestUrl(const QString *path = nullptr, const QUrlQuery *query = nullptr) const;

#if QT_CONFIG(ssl)
    QSslConfiguration sslConfig;
#endif
    QUrl baseUrl;
    QHttpHeaders headers;
    QByteArray bearerToken;
    QString userName;
    QString password;
    QUrlQuery queryParameters;
    QNetworkRequest::Priority priority = QNetworkRequest::NormalPriority;
    std::chrono::milliseconds transferTimeout{0};
    QHash<QNetworkRequest::Attribute, QVariant> attributes;
};

QT_END_NAMESPACE

#endif // QNETWORKREQUESTFACTORY_P_H