RESTinio
non_matched_request_handler.hpp
Go to the documentation of this file.
1 /*
2  * RESTinio
3  */
4 
5 /**
6  * @file
7  * @brief The definition of the non_matched_request_handler type.
8  *
9  * @since v.0.6.6
10  */
11 
12 #pragma once
13 
14 #include <restinio/request_handler.hpp>
15 
16 #include <functional>
17 
18 namespace restinio
19 {
20 
21 namespace router
22 {
23 
24 //
25 // generic_non_matched_request_handler_t
26 //
27 /*!
28  * @brief A generic type of handler for non-matched requests.
29  *
30  * Since v.0.6.13 some extra-data can be incorporated into a request
31  * object. In that case request-handler receives a parameter of type
32  * `generic_request_handle_t<Extra_Data>`. The name
33  * generic_non_matched_request_handler_t describes a type of
34  * generic handler that can be parametrized by a @a User_Type.
35  *
36  * @tparam Extra_Data The type of extra-data incorporated into a
37  * request object.
38  *
39  * @since v.0.6.13
40  */
41 template< typename Extra_Data >
43  std::function<
45  >;
46 //
47 // non_matched_request_handler_t
48 //
49 /*!
50  * @brief A type of handler for non-matched requests for a case when
51  * default extra-data-factory is specified in the server's traits.
52  *
53  * Since v.0.6.13 the name non_matched_request_handler_t is just
54  * an alias for generic_non_matched_request_handler_t.
55  */
59  >;
60 
61 } /* namespace router */
62 
63 } /* namespace restinio */
std::enable_if< std::is_same< Parameter_Container, query_string_params_t >::value||std::is_same< Parameter_Container, router::route_params_t >::value, optional_t< Value_Type > >::type opt_value(const Parameter_Container &params, string_view_t key)
Gets the value of a parameter specified by key wrapped in optional_t<Value_Type> if parameter exists ...
Definition: value_or.hpp:64