![]() |
boost::taar::handler::get_rest_arg — Direct or lazy retrieval of REST arg value from the arg provider.
// In header: <boost/taar/handler/rest_arg.hpp> template<typename HandlerArgType, typename ArgProviderType, typename RequestType> decltype(auto) get_rest_arg(ArgProviderType const & arg_provider, std::size_t index, RequestType const & request, matcher::context const & context);
A provider failure (other than an absent argument that with_default or a std::optional parameter absorbs) or a failed cast throws boost::taar::exception with error::invalid_argument_format, message argument <name> (position N) is invalid, data {"argument": name, "position": N}, and the provider's failure (or the cast's exception, wrapped by failure::from_exception) as the cause. A constrained provider's violation is thrown unwrapped.