C++ Web Framework  3.0
requestdispatcher.h
1 /*
2  Copyright 2017 Herik Lima de Castro and Marcelo Medeiros Eler
3  Distributed under MIT license, or public domain if desired and
4  recognized in your jurisdiction.
5  See file LICENSE for detail.
6 */
7 
8 #ifndef REQUESTDISPATCHER_H
9 #define REQUESTDISPATCHER_H
10 
11 #include <QString>
12 #include "cppwebframework_global.h"
13 
14 CWF_BEGIN_NAMESPACE
15 class Request;
16 class Response;
20 class CPPWEBFRAMEWORKSHARED_EXPORT RequestDispatcher
21 {
22  QString file;
23 public:
27  explicit RequestDispatcher(const QString &file) : file(file) {}
39  void forward(CWF::Request &request, CWF::Response &response);
40 };
41 
42 CWF_END_NAMESPACE
43 
44 #endif // REQUESTDISPATCHER_H
The Request class holds all information about a http request.
Definition: request.h:27
The RequestDispatcher class can be used to dispatch a requisition to a page.
Definition: requestdispatcher.h:20
~RequestDispatcher()
Virtual destructor.
Definition: requestdispatcher.h:31
The Response class is responsable to response a Http request.
Definition: response.h:25
RequestDispatcher(const QString &file)
This constructor receives a file name.
Definition: requestdispatcher.h:27