Skip to main content
Version: 4.17.3

SetHeaders component

The SetHeaders component is used to set headers on a message. A message passing through a flow consists of a body, headers and properties. The body contains the actual contents of the message (also called the payload). The headers hold metadata and are typically used internally or when executing HTTP calls.

This component cannot be used as the first component in a flow, as it expects to alter the headers of a message.

header order

Headers are set from top to bottom. Use the icon to rearrange the order in which headers are set.

Configuration

The SetHeaders component has the following configuration options:

Header name

Specifies the name of the header you wish to set.

Header names
  • Cannot contain spaces.
  • Are case-insensitive: Setting a header named subject when a Subject header already exists will replace the value of the existing Subject header.

Expression type

Specifies the language of the expression.

Options

  • Simple (default)
  • XPath
  • JsonPath
  • Groovy
  • Constant
Groovy
  • Supports only one-line expressions.
  • Use the Script component for multi-line scripts.
Constant

Constant expressions set a literal string, not its evaluated value. For example:

Using ${header.headername} or //root/order will set the header's value as ${header.headername} and //root/order, rather than resolving them.

Using Expressions

Each expression type has a dedicated page on the Academy. You can find them under Guides > References:

Expression

Defines the expression that sets the value of the header.

Last update on Feb 18, 2025