Set variables

Makes sure that @ng-apimock/core will add or update the variables.

Usage

setVariables(variables);

Parameters

NameTypeDetails
variablesobjectthe key/value object

Example

setVariables({
now: new Date().getTime(),
hello: 'hi'
});

Executing this will add the variables with:

  • key now and value the current date time
  • key hello and value hi

These variables will be used to interpolated with the mock response.