class route#
-
class route#
Provides the way to create routes.
- DESCRIPTION
A path and a method and a handler for serving the route must be specified for construction. And users can optionally bind it with
states andmiddlewares.
Public Static Functions
-
template<basic_fixed_string Path, typename Handler>
static inline auto handle(http::verb method, Handler &&handler)# Create a new route with specific method.
-
template<basic_fixed_string Path, typename Handler>
static inline auto any(Handler &&handler)# Create a new route with any method.
-
template<basic_fixed_string Path, typename Handler>
static inline auto get(Handler &&handler)# Create a new route with
GETmethod.
-
template<basic_fixed_string Path, typename Handler>
static inline auto post(Handler &&handler)# Create a new route with
POSTmethod.
-
template<basic_fixed_string Path, typename Handler>
static inline auto put(Handler &&handler)# Create a new route with
PUTmethod.
-
template<basic_fixed_string Path, typename Handler>
static inline auto patch(Handler &&handler)# Create a new route with
PATCHmethod.
-
template<basic_fixed_string Path, typename Handler>
static inline auto delete_(Handler &&handler)# Create a new route with
DELETEmethod.