1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QHTTPSERVERRESPONSE_P_H
5#define QHTTPSERVERRESPONSE_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 QHttpServerResponse. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16
17#include <private/qabstracthttpserver_p.h>
18
19#include <QtHttpServer/qhttpserverresponse.h>
20
21#include <functional>
22#include <unordered_map>
23
24QT_BEGIN_NAMESPACE
25
26class QHttpServerResponsePrivate
27{
28 struct HashHelper {
29 std::size_t operator()(const QByteArray& key) const
30 {
31 return qHash(key: key.toLower());
32 }
33 };
34
35public:
36 QHttpServerResponsePrivate(QByteArray &&d, const QHttpServerResponse::StatusCode sc);
37 QHttpServerResponsePrivate(const QHttpServerResponse::StatusCode sc);
38
39 QByteArray data;
40 QHttpServerResponse::StatusCode statusCode;
41 std::unordered_multimap<QByteArray, QByteArray, HashHelper> headers;
42};
43
44QT_END_NAMESPACE
45
46#endif // QHTTPSERVERRESPONSE_P_H
47

source code of qthttpserver/src/httpserver/qhttpserverresponse_p.h