Edit a Snapshot's Traffic
You can change what a snapshot recorded without recording it again: fix a request body, add or remove a header, or replace a value everywhere it appears. Each change is kept in the snapshot's patch, so the recording stays as it was captured and the change shows in the snapshot's change history. Saving a change starts a reanalysis of the snapshot, and the snapshot can be replayed again when it finishes.
A locked snapshot, or one still being analyzed, cannot be edited.
Edit a body or headers
- Open the snapshot's Traffic tab and select an HTTP request.
- On the Request or Response tab, click Edit.
- Change the headers, one
Name: valueper line, or the body. - Click Save.
Only the headers you changed are saved, and a header you delete is removed. When the body changes, its Content-Length header changes with it. For a compressed or binary body, you can edit the headers only. A header recorded with several values is saved as one value, joined with commas.
Find and replace
- On the Traffic tab, under Requests, click Find and replace.
- Type the text to find, tick Match case if you need it, and click Search.
- Check the matches. Each one shows where it is, such as a header or a field of a JSON body, the request it is in, and the text around it. Click a match to open its request.
- Type the replacement and click Replace all, then confirm.
Text is matched in URLs, methods, header and query parameter values, bodies and the response status text. In a JSON body, each string value is searched on its own, so a replacement cannot break the JSON. A number, true, false or null in a JSON body can be found but not replaced, and is marked Not replaceable.
One replace changes at most 500 requests and says so when more matched; run it again for the rest. A search lists up to 5,000 matches and reads up to the first 100,000 requests of a snapshot.
proxymock web's find and replace and body editing work on workspace recordings the same way and find the same matches; see Modify RRPairs.