Variable ros2_medkit_gateway::http::detail::kKeepCurrentStatus

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 body is well-formed (typically DTO-derived JSON).

If status is kKeepCurrentStatus (sentinel = 0) the caller-provided res.status is 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 kKeepCurrentStatus to leave res.status unchanged. Defaults to 200.