boost::http::route_result
The result type returned by route handlers.
Description
This class represents the outcome of a route handler. Handlers return this type to indicate how the router should proceed. Construct from a directive constant or an error code:
route_task my_handler(route_params& p)
{
if(! authorized(p))
co_return route_next; // try next handler
if(auto ec = process(p); ec)
co_return ec; // return error
co_return route_done; // success
}
Member Functions
Name |
Description |
|
Construct from a directive constant. |
Return the error code, if any. |
|
Return true if the result indicates an error. |
|
Return the directive for this result. |
See Also
route_task, route_what, route_done, route_next
Created with MrDocs