Skip to main content

rewrite_response

Function rewrite_response 

Source
pub fn rewrite_response(
    method: &str,
    body: &mut Value,
    config: &RewriteConfig,
) -> bool
Expand description

Rewrite a JSON-RPC response in place for the given method.

Returns true iff the body was actually mutated. Callers use this to decide whether the response needs to be re-serialized — see pipeline::handlers::buffered for the buffered-path dispatcher.