![]() |
boost::taar::handler::url_encoded_form_data_arg — Argument provider that parses an application/x-www-form-urlencoded body.
// In header: <boost/taar/handler/rest_arg.hpp> struct url_encoded_form_data_arg { // public member functions template<typename... T> url_encoded_form_data_arg(T &&...); url_encoded_form_data_arg(all_content_types_t, description = {}); std::string name() const; std::string const & description() const; std::unordered_set< std::string > const & content_types() const; taar::result< form_kvp > operator()(boost::beast::http::request< boost::beast::http::string_body > const &, matcher::context const &) const; // public data members std::unordered_set< std::string > content_types_; std::string description_; };
Decodes the body into a boost::taar::form_kvp map keyed by the percent-decoded parameter names. Other content types are rejected with error::invalid_content_type unless overridden.
url_encoded_form_data_arg public member functionstemplate<typename... T> url_encoded_form_data_arg(T &&... args);
url_encoded_form_data_arg(all_content_types_t, description d = {});
std::string name() const;
std::string const & description() const;
std::unordered_set< std::string > const & content_types() const;
taar::result< form_kvp > operator()(boost::beast::http::request< boost::beast::http::string_body > const & request, matcher::context const &) const;