26#ifndef ROUTER_SRC_HTTP_SRC_HTTP_REQUEST_ROUTER_H_
27#define ROUTER_SRC_HTTP_SRC_HTTP_REQUEST_ROUTER_H_
48 void append(
const std::string &url_regex_str,
49 std::unique_ptr<RequestHandler> cb);
50 void remove(
const void *handler_id);
51 void remove(
const std::string &url_regex_str);
Definition: http_request_router.h:42
BaseRequestHandlerPtr find_route_handler(const std::string &path)
Definition: http_request_router.cc:148
void set_default_route(std::unique_ptr< RequestHandler > cb)
Definition: http_request_router.cc:98
void require_realm(const std::string &realm)
Definition: http_request_router.h:57
std::shared_ptr< http::base::RequestHandler > BaseRequestHandlerPtr
Definition: http_request_router.h:45
void handler_not_found(http::base::Request &req)
Definition: http_request_router.cc:83
void clear_default_route()
Definition: http_request_router.cc:105
std::string require_realm_
Definition: http_request_router.h:73
void route(http::base::Request &req) override
Definition: http_request_router.cc:111
BaseRequestHandlerPtr default_route_
Definition: http_request_router.h:72
void remove(const void *handler_id)
Definition: http_request_router.cc:57
std::mutex route_mtx_
Definition: http_request_router.h:75
std::vector< RouterData > request_handlers_
Definition: http_request_router.h:70
void append(const std::string &url_regex_str, std::unique_ptr< RequestHandler > cb)
Request router.
Definition: http_request_router.cc:48
Definition: request_handler.h:36
Definition: request_handler_interface.h:34
static char * path
Definition: mysqldump.cc:149
Definition: http_request_router.h:60
BaseRequestHandlerPtr handler
Definition: http_request_router.h:63
std::regex url_regex
Definition: http_request_router.h:62
std::string url_regex_str
Definition: http_request_router.h:61