QDjango: QDjangoHttpRequest.h Source File

QDjango

QDjangoHttpRequest.h
1 /*
2 * Copyright (C) 2010-2015 Jeremy Lainé
3 * Contact: https://github.com/jlaine/qdjango
4 *
5 * This file is part of the QDjango Library.
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 */
17
18 #ifndef QDJANGO_HTTP_REQUEST_H
19 #define QDJANGO_HTTP_REQUEST_H
20
21 #include <QString>
22
23 #include "QDjangoHttp_p.h"
24
25 class QDjangoHttpRequestPrivate;
26
31 class QDJANGO_HTTP_EXPORT QDjangoHttpRequest
32 {
33 public:
34 QDjangoHttpRequest();
35 ~QDjangoHttpRequest();
36
37 QByteArray body() const;
38 QString get(const QString &key) const;
39 QString meta(const QString &key) const;
40 QString method() const;
41 QString path() const;
42 QString post(const QString &key) const;
43
44 private:
45 Q_DISABLE_COPY(QDjangoHttpRequest)
46 QDjangoHttpRequestPrivate* const d;
47 friend class QDjangoFastCgiConnection;
48 friend class QDjangoHttpConnection;
49 friend class QDjangoHttpTestRequest;
50 friend class tst_QDjangoHttpController;
51 friend class tst_QDjangoHttpRequest;
52 };
53
56 class QDJANGO_HTTP_EXPORT QDjangoHttpTestRequest : public QDjangoHttpRequest
57 {
58 public:
59 QDjangoHttpTestRequest(const QString &method, const QString &path);
60
61 private:
62 Q_DISABLE_COPY(QDjangoHttpTestRequest)
63 };
64
67 #endif
QDjangoHttpRequest
The QDjangoHttpRequest class represents an HTTP request.
Definition: QDjangoHttpRequest.h:32