tufao
1.3.0
An asynchronous web framework for C++ built on top of Qt
|
A handler that responds with "Not found" to every request. More...
Public Slots | |
bool | handleRequest (Tufao::HttpServerRequest &request, Tufao::HttpServerResponse &response) override |
It responds to the request with a not found message. | |
Public Member Functions | |
NotFoundHandler (QObject *parent=0) | |
Constructs a NotFoundHandler object. More... | |
Public Member Functions inherited from Tufao::AbstractHttpServerRequestHandler | |
operator std::function< bool (HttpServerRequest &, HttpServerResponse &)>() | |
Implicit conversion operator to std::function functor object. More... | |
virtual bool | handleRequest (Tufao::HttpServerRequest &request, Tufao::HttpServerResponse &response)=0 |
Handles the request using the response object. More... | |
Static Public Member Functions | |
static std::function< bool(HttpServerRequest &, HttpServerResponse &)> | handler () |
Returns a handler that don't depends on another object. More... | |
A handler that responds with "Not found" to every request.
Its purpose is to avoid boilerplate code.
|
explicit |
Constructs a NotFoundHandler object.
parent
is passed to the QObject constructor.
|
inlinestatic |
Returns a handler that don't depends on another object.
The purpose of this alternative handler is to free you of the worry of maintain the NotFoundHandler's object (lifetime) while the functor object is being used.