<< Click to Display Table of Contents >> Navigation: Event and Object Analysis > Capture Results Filtering > Filtration Basics > Rules > Actions > HEADER action |
Adds a custom X-Sensor-... header to the object's metadata or modifies the value of the existing X-Sensor-... header.
Description
The action adds a custom header to the message: X-Sensor-...
If a header with such name already exists in the message, its value is replaced with a new one.
Format
<action name="header" headername="<UserHeader>" value="<user header value>" />
The "name" attribute:
The name attribute contains the action name: name="header".
The "headername" attribute:
The headername="..." attribute specifies the name of the string label to be set.
The "value" attribute:
The value="..." attribute specifies the header value.
Example
Adds the following header to the message: X-Sensor-UserHeader: user header value.
<?xml version="1.0" encoding="utf-8"?>
<filter name="TEST" version="1.0">
<comment>This is the comment for the filter.</comment>
<table name="main">
<rule enabled="true">
<comment>
Adds the following header to the message:
X-Sensor-UserHeader: user header value.
</comment>
<action name="header"
headername="UserHeader"
value="user header value" />
</rule>
<rule enabled="true">
<match><c name="all"/></match>
<action name="accept" />
</rule>
</table>
</filter>