Variable ros2_medkit_gateway::http::detail::tl_forward_response

Variable Documentation

thread_local httplib::Response *ros2_medkit_gateway::http::detail::tl_forward_response

Framework-internal thread-local channel that lets the typed validate_entity_for_route overload stream the proxied response body to the underlying cpp-httplib response when an entity belongs to a remote peer.

The typed router installs a ForwardResponseScope around every typed handler invocation so the validator can write the proxy response to the real cpp-httplib response object without taking httplib::Response & as a parameter.

The framework guarantees one in-flight call per thread, so a thread_local pointer is safe. Handlers MUST NOT touch this header - it is part of the internal routing layer.