17 #ifndef COM_BORA_SOFTWARE__BALAU_NETWORK_HTTP_SERVER_HTTP_WEB_APPS__CANNED_HTTP_WEB_APP 18 #define COM_BORA_SOFTWARE__BALAU_NETWORK_HTTP_SERVER_HTTP_WEB_APPS__CANNED_HTTP_WEB_APP 25 class EnvironmentProperties;
27 namespace Network::Http::HttpWebApps {
45 public:
CannedHttpWebApp(std::string mimeType_, std::string getResponseBody_, std::string postResponseBody_);
54 std::map<std::string, std::string> & variables)
override;
58 std::map<std::string, std::string> & variables)
override;
62 std::map<std::string, std::string> & variables)
override;
68 private:
const std::string mimeType;
69 private:
const std::string getResponseBody;
70 private:
const std::string postResponseBody;
77 #endif // COM_BORA_SOFTWARE__BALAU_NETWORK_HTTP_SERVER_HTTP_WEB_APPS__CANNED_HTTP_WEB_APP void handleHeadRequest(HttpSession &session, const StringRequest &request, std::map< std::string, std::string > &variables) override
Handle a HEAD request.
Manages the handling of HTTP messages and WebSocket upgrade requests in an HTTP connection.
Definition: HttpSession.hpp:46
The root Balau namespace.
Definition: ApplicationConfiguration.hpp:23
A hierarchical environment properties holder created from a composite property.
Definition: EnvironmentProperties.hpp:59
An HTTP web application handler that serves a fixed response for each request method.
Definition: CannedHttpWebApp.hpp:32
Abstract base class of HTTP web application handlers.
Definition: HttpWebApp.hpp:39
Abstract base class of HTTP web application handlers.
void handleGetRequest(HttpSession &session, const StringRequest &request, std::map< std::string, std::string > &variables) override
Handle a GET request.
Request< StringBody > StringRequest
A request with a string body.
Definition: NetworkTypes.hpp:267
CannedHttpWebApp(std::string mimeType_, std::string getResponseBody_, std::string postResponseBody_)
Create a canned handler that has get and post method bodies.
void handlePostRequest(HttpSession &session, const StringRequest &request, std::map< std::string, std::string > &variables) override
Handle a POST request.