Documentation menu
DocumentationChange a response field with Rewrite

Change a response field with Rewrite

Use one captured call to create a rule that changes a value on future matching calls.

Change the cart total

  1. Open a captured GetCart call from your test app and select Response.
  2. Find the price field and open its edit control. If the schema is inferred, use the numbered field that corresponds to the price.
  3. Enter a replacement of the same type. For example, change the integer 1999 to 1299 if the service returns prices in cents. Save the edit.
  4. Trigger the same call again from the app. Open the fresh response and verify both the new value and what the app displays.

Check and adjust the rule

Open Rewrite & Status to see the generated rule. Check its match, direction and field path. Disable the rule when you're done to restore the original behavior.

Rewrite headers or status

Use the full Rewrite & Status editor for headers, status or a rule that applies across multiple calls. Use a Breakpoint when you need to stop a single call before deciding what to change.

Watch the gRPC Rewrite example to see the original and modified responses side by side.