replace-xhr-request

Check that the replace-xhr-request snippet is working as expected.

Basic

Test that a string in the XHR request body is replaced with the given replacement value.

Example Content
Waiting 500ms to trigger snippet...
XHR request body was replaced

Steps

Filters

Regex

Test that a regex pattern in the XHR request body is replaced with the given replacement value.

Example Content
Waiting 500ms to trigger snippet...
XHR request body was replaced

Steps

Filters

Needle

Test that replacement only happens when the needle matches the request body.

Example Content
Waiting 500ms to trigger snippet...
XHR request body was replaced

Steps

Filters

JSONPath

Test that a JSONPath expression targets and replaces a nested property in the request body.

Example Content
Waiting 500ms to trigger snippet...
XHR request body was replaced

Steps

Filters

JSONPath append

Test that JSONPath append mode pushes a value into an existing array in the request body.

Example Content
Waiting 500ms to trigger snippet...
XHR request body was replaced

Steps

Filters