Skip to content
Sahi Pro Flowcharts is retired. These pages document the last release (v12) and are no longer updated. Go to the current documentation.Flowcharts is retired. Current docs
Get Free Trial
Sahi Pro Flowcharts is retired. These pages document the last release (v12) and are no longer updated. Go to the current documentation.

HTTP Response Manipulation APIs

These APIs help manipulate HTTP response of browsers or devices.

Modes Browser

Substitutes the HTTP response for all further responces coming in this browser session. If a HTTP Response Substitution Rule of given name already exists, it will be replaced.

Parameters

NameTypeDescription
$namestringResponse substitution rule name
$urlPatternstringSubstitution url pattern
$isRegExpbooleanBoolean parameter to find the string as regular expressions if true.
$findstringFind the value to replace.
$replacestringReplacing all occurrences of old value in this string.
Raw script
//Add the response substitution rule.
_addResponseSubstitutionRule("test", "https://sahitest.com/demo/", false, "Link Test", "Link Test1");

Sahi Pro Classic API _addResponseSubstitutionRule

Modes Browser

Removes the response substitution rule for all further responces coming in this browser session.

Parameters

NameTypeDescription
$namestringResponse substitution rule name
Raw script
//Remove the response substitution rule.
_removeResponseSubstitutionRule("test");

Sahi Pro Classic API _removeResponseSubstitutionRule