Class HttpRequestHandlerGroup
Defined in File http_request_handler.hpp
Class Documentation
-
class async_web_server_cpp::HttpRequestHandlerGroup
A hander that can dispatch to a request to different handlers depending on a predicate. If none of registered handlers satisfy the request then the default request handler is used.
Public Types
-
typedef boost::function<bool(const HttpRequest&)> HandlerPredicate
Public Functions
-
HttpRequestHandlerGroup(HttpServerRequestHandler default_handler)
-
void addHandlerForPath(const std::string &path_regex, HttpServerRequestHandler handler)
-
void addHandler(HandlerPredicate predicate, HttpServerRequestHandler handler)
-
typedef boost::function<bool(const HttpRequest&)> HandlerPredicate