Reputation: 49
I am trying to understand how I can read a property from the incoming request header. What type of mediators do I have to access incoming request Headers?
Upvotes: 1
Views: 564
Reputation: 1294
You can refer to the documentation: Synapse XPath Variable $trp
<property name="stockprop" expression="$trp:Content-Type"/>
See also: how to read HTTP headers in ESB
Upvotes: 3
Reputation: 2653
The easiest way to read incoming request headers is to use a property mediator and with the scope set to transport.
For example for a request header called TestHeader:
<property name=”TestHeaderValue” expression=”get-property(‘transport’,’TestHeader’)”/>
or
<property name=”TestHeaderValue” expression=”$trp:TestHeader”/>
Upvotes: 2