Skip to main content

shape_messages

Function shape_messages 

Source
pub fn shape_messages(body: &mut Value, ctx: &ModelContext) -> bool
Expand description

Apply every message-level transform, in order.

Returns true when body was modified. Callers holding the request as bytes use this to skip a re-serialization and forward the client’s original payload untouched — which is not merely an optimisation for the proxy, where history truncation measures the payload in wire bytes and would otherwise measure a re-encoded body instead of the one the client sent.