Template Struct overload_group

Struct Documentation

template<typename U, typename V>
struct udho::overload_group

compile time chain of url mappings

See

content_wrapper0

See

content_wrapper1

Public Types

typedef overload_group<U, V> self_type

type of this overload

typedef U parent_type

type of the parient in the meta-chain of overloads

typedef V overload_type

type of the next child in the overload chain

typedef parent_type::terminal_type terminal_type

Public Functions

overload_group(const parent_type &parent, const overload_type &overload)
template<typename ContextT, typename Lambda>
int serve(ContextT &ctx, boost::beast::http::verb request_method, const std::string &subject, Lambda send)

serves the content if the http request matches with the content’s request method and path. Calls the callback in _overload if it is feasible for the current request. Otherwise bubbles the request meta-recursively if some other overload group is feasible.

Parameters
  • req: the http request to serve

  • request_method: http vmethod get post put head etc …

  • subject: http resource path

  • send: the write callback

void summary(std::vector<module_info> &stack) const
template<typename AttachmentT>
self_type &listen(boost::asio::io_service &io, AttachmentT &attachment, int port = 9198)
template<typename F>
void eval(F &fnc)
const terminal_type &terminal() const

Public Members

parent_type _parent
overload_type _overload