Set variable
Makes sure that @ng-apimock/core will add or update the variable.
Usage
setVariable(key, value);
Parameters
Name | Type | Details |
---|---|---|
key | string | the key |
value | any | the value |
Example
setVariable('now', new Date().getTime());
Executing this will add a variable with key now
and value the current date time
.
This variable will be used to interpolated with the mock response.