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
state
s andmiddleware
s.
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
GET
method.
-
template<basic_fixed_string Path, typename Handler>
static inline auto post(Handler &&handler)# Create a new route with
POST
method.
-
template<basic_fixed_string Path, typename Handler>
static inline auto put(Handler &&handler)# Create a new route with
PUT
method.
-
template<basic_fixed_string Path, typename Handler>
static inline auto patch(Handler &&handler)# Create a new route with
PATCH
method.
-
template<basic_fixed_string Path, typename Handler>
static inline auto delete_(Handler &&handler)# Create a new route with
DELETE
method.