Boost C++ Libraries

PrevUpHomeNext

Struct target_arg

boost::taar::handler::target_arg — Argument provider that returns the request target as a std::string.

Synopsis

// In header: <boost/taar/handler/rest_arg.hpp>


struct target_arg {

  // public member functions
  target_arg();
  std::string name() const;
  taar::result< std::string > 
  operator()(boost::beast::http::request_header<> const &, 
             matcher::context const &) const;
};

Description

Useful when you need to implement custom parsing logic that path_arg and query_arg cannot express. The target contains the path and query string (if any), but neither the scheme nor the authority.

target_arg public member functions

  1. target_arg();
  2. std::string name() const;
  3. taar::result< std::string > 
    operator()(boost::beast::http::request_header<> const & request, 
               matcher::context const &) const;

PrevUpHomeNext