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
- Open a captured
GetCartcall from your test app and selectResponse. - Find the price field and open its edit control. If the schema is inferred, use the numbered field that corresponds to the price.
- Enter a replacement of the same type. For example, change the integer
1999to1299if the service returns prices in cents. Save the edit. - 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.