What can I help you with?
NVIDIA Morpheus (25.02.01)

Typedef morpheus::request_handler_fn_t

using morpheus::request_handler_fn_t = std::function<parse_status_t(const tcp_endpoint_t &tcp_endpoint, const request_t &request)>

A function that receives the TCP endpoint, and the request object. Returning an instance of parse_status_t.

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.

Note: This method is preferred over the payload_parse_fn_t as it provides access to the request headers.

Previous Typedef morpheus::RankType
Next Typedef morpheus::request_queue_t
© Copyright 2024, NVIDIA. Last updated on Mar 3, 2025.