Handles matching requests to existing rules and upgrade requests. More...
#include <routing.h>
Public Member Functions | |
DynamicRule & | new_rule_dynamic (const std::string &rule) |
template<uint64_t N> | |
black_magic::arguments< N >::type::template rebind< TaggedRule > & | new_rule_tagged (const std::string &rule) |
CatchallRule & | catchall_rule () |
void | internal_add_rule_object (const std::string &rule, BaseRule *ruleObject) |
void | internal_add_rule_object (const std::string &rule, BaseRule *ruleObject, const uint16_t &BP_index, std::vector< Blueprint * > &blueprints) |
void | register_blueprint (Blueprint &blueprint) |
void | get_recursive_child_methods (Blueprint *blueprint, std::vector< HTTPMethod > &methods) |
void | validate_bp () |
void | validate_bp (std::vector< Blueprint * > blueprints, detail::middleware_indices ¤t_mw) |
void | validate () |
template<typename Adaptor > | |
void | handle_upgrade (const request &req, response &res, Adaptor &&adaptor) |
void | get_found_bp (std::vector< uint16_t > &bp_i, std::vector< Blueprint * > &blueprints, std::vector< Blueprint * > &found_bps, uint16_t index=0) |
std::string | get_error (unsigned short code, routing_handle_result &found, const request &req, response &res) |
Is used to handle errors, you insert the error code, found route, request, and response. and it'll either call the appropriate catchall route (considering the blueprint system) and send you a status string (which is mainly used for debug messages), or just set the response code to the proper error code. | |
std::unique_ptr< routing_handle_result > | handle_initial (request &req, response &res) |
template<typename App > | |
void | handle (request &req, response &res, routing_handle_result found) |
template<typename App > | |
std::enable_if< std::tuple_size< typename App::mw_container_t >::value !=0, void >::type | handle_rule (BaseRule *rule, crow::request &req, crow::response &res, const crow::routing_params &rp) |
template<typename App > | |
std::enable_if< std::tuple_size< typename App::mw_container_t >::value==0, void >::type | handle_rule (BaseRule *rule, crow::request &req, crow::response &res, const crow::routing_params &rp) |
void | debug_print () |
std::vector< Blueprint * > & | blueprints () |
std::function< void(crow::response &)> & | exception_handler () |
Static Public Member Functions | |
static void | default_exception_handler (response &res) |
Public Attributes | |
bool | using_ssl |
Handles matching requests to existing rules and upgrade requests.