Typedef morpheus::payload_parse_fn_t
Defined in File http_server.hpp
-
using morpheus::payload_parse_fn_t = std::function<parse_status_t(const std::string &body)>
A function that receives the post body and returns an HTTP status code, Content-Type string and body.
The function is expected to return a tuple conforming to
parse_status_t
consisting of the HTTP status code, mime type value for the Content-Type header, body of the response and optionally a callback function. If specified, the callback function which will be called once the response has been sent or failed to send, as indicated by aboost::system::error_code
reference passed to the function.Refer to https://www.boost.org/doc/libs/1_74_0/libs/system/doc/html/system.html#ref_class_error_code for more information regarding
boost::system::error_code
.Note: Ussage of this function is discouraged in favor of the request_handler_fn_t as it provides access to the request headers, but remains available for compatibility. This method may be deprecated in the future.