![]() |
boost::taar::handler::path_arg — Argument provider that reads a captured path-template placeholder.
// In header: <boost/taar/handler/rest_arg.hpp> struct path_arg { // public member functions path_arg(std::string, std::string = {}); std::string const & name() const; std::string const & description() const; taar::result< std::string > operator()(boost::beast::http::request_header<> const &, matcher::context const &) const; // public data members std::string path_key_; std::string description_; };
Looks up path_key in boost::taar::matcher::context::path_args, which the target matcher populates when the request path matches its template. Reports error::argument_not_found if the key is absent.
path_arg public member functionspath_arg(std::string path_key, std::string description = {});
std::string const & name() const;
std::string const & description() const;
taar::result< std::string > operator()(boost::beast::http::request_header<> const &, matcher::context const & context) const;