17 #ifndef COM_BORA_SOFTWARE__BALAU_NETWORK_SERVER__HTTP_WEB_APPLICATION 18 #define COM_BORA_SOFTWARE__BALAU_NETWORK_SERVER__HTTP_WEB_APPLICATION 21 #include <Balau/Network/Http/Server/Impl/HttpWebAppFactory.hpp> 47 Impl::HttpWebAppFactory::registerHttpWebApp<WebAppT>(name);
123 std::map<std::string, std::string> & variables) = 0;
136 std::map<std::string, std::string> & variables) = 0;
149 std::map<std::string, std::string> & variables) = 0;
161 #endif // COM_BORA_SOFTWARE__BALAU_NETWORK_SERVER__HTTP_WEB_APPLICATION Components and utilities working on HTTP data transmission.
Definition: HttpClient.hpp:26
static StringResponse createBadRequestResponse(HttpSession &session, const StringRequest &request, std::string_view errorMessage)
Create a bad request response.
virtual void handleGetRequest(HttpSession &session, const StringRequest &request, std::map< std::string, std::string > &variables)=0
Handle a GET request.
virtual void handlePostRequest(HttpSession &session, const StringRequest &request, std::map< std::string, std::string > &variables)=0
Handle a POST request.
static EmptyResponse createOkHeadResponse(HttpSession &session, const StringRequest &request)
Create an empty 200 response for a head request.
Manages the handling of HTTP messages and WebSocket upgrade requests in an HTTP connection.
Definition: HttpSession.hpp:46
Low level types used in networking code.
static EmptyResponse createNotFoundHeadResponse(HttpSession &session, const StringRequest &request)
Create a not found response for a head request.
virtual ~HttpWebApp()=default
Destroy the HTTP web application instance.
static EmptyResponse createBadRequestHeadResponse(HttpSession &session, const StringRequest &request)
Create a bad request response for a head request.
static void registerHttpWebApp(const std::string &name)
Register an HTTP web application.
Definition: HttpWebApp.hpp:46
Abstract base class of HTTP web application handlers.
Definition: HttpWebApp.hpp:39
Response< EmptyBody > EmptyResponse
A response with an empty body.
Definition: NetworkTypes.hpp:293
Response< StringBody > StringResponse
A response with a string body.
Definition: NetworkTypes.hpp:283
Request< StringBody > StringRequest
A request with a string body.
Definition: NetworkTypes.hpp:267
static EmptyResponse createPermanentRedirectResponse(HttpSession &session, const StringRequest &request, std::string_view location)
Create a permanent redirect response.
static StringResponse createOkResponse(HttpSession &session, const StringRequest &request)
Create an empty 200 response.
static StringResponse createServerErrorResponse(HttpSession &session, const StringRequest &request, std::string_view errorMessage)
Create a server error response.
static EmptyResponse createRedirectResponse(HttpSession &session, const StringRequest &request, std::string_view location)
Create a redirect response.
virtual void handleHeadRequest(HttpSession &session, const StringRequest &request, std::map< std::string, std::string > &variables)=0
Handle a HEAD request.
static StringResponse createNotFoundStringResponse(HttpSession &session, const StringRequest &request)
Create a not found response.
static EmptyResponse createServerErrorHeadResponse(HttpSession &session, const StringRequest &request)
Create a server error response for a head request.