Variable ros2_medkit_gateway::http::detail::kKeepCurrentStatus
Defined in File primitives.hpp
Variable Documentation
-
constexpr int ros2_medkit_gateway::http::detail::kKeepCurrentStatus = 0
Write a JSON body with the given HTTP status.
Indented with 2 spaces to match the gateway’s existing send_json convention. The caller is responsible for ensuring
bodyis well-formed (typically DTO-derived JSON).If
statusiskKeepCurrentStatus(sentinel = 0) the caller-providedres.statusis left untouched. This lets the remaining raw-route callers (PluginResponse, DocsHandlers, SSEFaultHandler) pre-set the status (e.g. 201 Created) before calling the writer. The typed router always passes an explicit status.- Param token:
Framework access token (constructible only by friends).
- Param res:
HTTP response to mutate.
- Param body:
JSON payload to serialize.
- Param status:
HTTP status code; pass
kKeepCurrentStatusto leaveres.statusunchanged. Defaults to 200.