Skip to main content

render_action_response

Function render_action_response 

Source
pub fn render_action_response(
    protocol: &WebUIProtocol,
    state: Value,
    entry_id: &str,
    request_path: &str,
    index: &mut ProtocolIndex,
) -> Value
Expand description

Produce a JSON response for a POST mutation action.

Walks the matched route chain, resolves invalidates tag templates with actual param values, and returns them alongside the application state. Host servers call this for POST requests to route paths.

Returns a serde_json::Value object with fields:

  • state: the application state passed through
  • invalidateTags: resolved invalidation tags from the matched leaf route
  • path: the request path