![]() |
boost::taar::response_from — Convert one or more values into an HTTP response.
// In header: <boost/taar/core/response_from.hpp> template<has_response_from... T> constexpr auto response_from(T &&... value);
Resolution order:
A user-defined tag_invoke(response_from_tag<...>, ...) overload found by ADL takes precedence.
Otherwise a built-in conversion is selected. Built-ins cover std::string, std::string_view, char const*, integral and floating-point values (rendered with std::format), boost::json::value (serialised as application/json), and std::span<std::byte const> / std::vector<std::byte> (sent as application/octet-stream).
Calling with no arguments returns a default empty 200 response, which is the response produced when a void-returning handler completes successfully.
Returns: |
A value satisfying |