17 #ifndef COM_BORA_SOFTWARE__BALAU_NETWORK_HTTP_SERVER_HTTP_WEB_APPS__FILE_SERVING_HTTP_WEB_APP 18 #define COM_BORA_SOFTWARE__BALAU_NETWORK_HTTP_SERVER_HTTP_WEB_APPS__FILE_SERVING_HTTP_WEB_APP 25 class EnvironmentProperties;
27 namespace Network::Http::HttpWebApps {
50 std::map<std::string, std::string> & variables)
override;
54 std::map<std::string, std::string> & variables)
override;
58 std::map<std::string, std::string> & variables)
override;
67 private:
const std::string defaultFile;
74 #endif // COM_BORA_SOFTWARE__BALAU_NETWORK_HTTP_SERVER_HTTP_WEB_APPS__FILE_SERVING_HTTP_WEB_APP Manages the handling of HTTP messages and WebSocket upgrade requests in an HTTP connection.
Definition: HttpSession.hpp:46
FileServingHttpWebApp(Resource::File documentRoot_, std::string defaultFile_="index.html")
Construct a file serving web application.
void handleGetRequest(HttpSession &session, const StringRequest &request, std::map< std::string, std::string > &variables) override
Handle a GET request.
The root Balau namespace.
Definition: ApplicationConfiguration.hpp:23
A hierarchical environment properties holder created from a composite property.
Definition: EnvironmentProperties.hpp:59
Abstract base class of HTTP web application handlers.
Definition: HttpWebApp.hpp:39
An HTTP web application handler that serve files from the file system.
Definition: FileServingHttpWebApp.hpp:32
Abstract base class of HTTP web application handlers.
Request< StringBody > StringRequest
A request with a string body.
Definition: NetworkTypes.hpp:267
void handlePostRequest(HttpSession &session, const StringRequest &request, std::map< std::string, std::string > &variables) override
Handle a POST request.
A file on the local file system.
Definition: File.hpp:35
void handleHeadRequest(HttpSession &session, const StringRequest &request, std::map< std::string, std::string > &variables) override
Handle a HEAD request.
FileBody::value_type FileBodyValue
The type of the message body represented by a file on the filesystem.
Definition: NetworkTypes.hpp:251