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&)>
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 a boost::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
.