23 #ifndef TUFAO_NOTFOUNDHANDLER_H
24 #define TUFAO_NOTFOUNDHANDLER_H
26 #include "abstracthttpserverrequesthandler.h"
27 #include "httpserverresponse.h"
57 static std::function<bool(HttpServerRequest&, HttpServerResponse&)>
68 static const QByteArray body;
71 inline std::function<bool(HttpServerRequest&, HttpServerResponse&)>
75 response.writeHead(HttpResponseStatus::NOT_FOUND);
83 #endif // TUFAO_NOTFOUNDHANDLER_H
This class provides an interface for HttpServerRequest handlers.
Definition: abstracthttpserverrequesthandler.h:50
The Tufao::HttpServerResponse is used to respond to a Tufao::HttpServerRequest.
Definition: httpserverresponse.h:142
The Tufao::HttpServer represents a HTTP request received by Tufao::HttpServer.
Definition: httpserverrequest.h:54
A handler that responds with "Not found" to every request.
Definition: notfoundhandler.h:39
static std::function< bool(HttpServerRequest &, HttpServerResponse &)> handler()
Returns a handler that don't depends on another object.
Definition: notfoundhandler.h:72
This is the namespace where all Tufão facilities are grouped.
Definition: abstracthttpserverrequesthandler.h:30