${headers.type} contains 'client'" /> ${headers.type} contains 'client'" /> ${headers.type} contains 'client'"/>

Apache Camel: set boolean header using simple contains

829 Views Asked by At

Is there any way to set header with boolean value for checking contains like this.

<setHeader name="status">
    <simple>${headers.type} contains 'client'</simple>
 </setHeader>

This should set status as true if type contains client else false.

1

There are 1 best solutions below

0
Greenev On

Check the docs, you need resultType

<setHeader name="status">
    <simple resultType="java.lang.Boolean">${headers.type} contains 'client'</simple>
 </setHeader>