Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

API

Notes

message.getAllHeaders()

Get all headers of a message.

message.getHeader(name)

Get value of a message header

Parameters

  • name the name of the header to get

message.setHeader(key, value)

Set the value of a message header

Parameters

  • key (String) the name of the header to set

  • value (String) the value of the header to set

print(str)

Adds output that is recorded during execution and shown in the processing report.

Parameters

  • str (String) the string to be recorded

setOutcome(outcome, reason)

Set the processing outcome of the script

Parameters

  • outcome (String) the outcome type available outcome values: DROP, IGNORE, FORWARD

  • reason (String) the reason for the outcome

assert

See below. https://nodejs.org/api/assert.html

RegExp

Regular expressions can be evaluated within the script. This is often used for searches within string values for matching content. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp for more information.

...