Extract org.restlet.http.headers value from Camel headers inside a .choice()
<p>I'm trying to extract a value from org.restlet.http.headers header collection in a Camel route. </p>

<p>My incoming POST has a http header property called IncomingRequestType: ABCD.
Camel moves this inside the exchange headers collection, but it is buried inside org.restlet.http.headers which is in-itself a collection of headers.</p>

<p>I can extract the value in a process using the code below:</p>

<pre><code>.process(new Processor() {
    public void process(Exchange exchange) throws Exception {
      org.restlet.util.Series&lt;Header&gt; httpHeaders = null;
      httpHeaders = (Series&lt;Header&gt;) exchange.getIn().getHeader("org.restlet.http.headers");
      String reqType = httpHeaders.getValues("IncomingRequestType").toString();
}})
</code></pre>

<p>Outside of a process I need to access the IncomingRequestType inside a .choice().when()</p>

<p>e.g. i want to be able to do:</p>

<pre><code>.choice()
    .when(header("org.restlet.http.headers")["IncomingRequestType"]).isEqualTo("ABCD"))
</code></pre>

<p>Any suggestions on how this can be done. I've tried creating predicates but cannot get a suitable solution. </p>