java - Apache Camel: Query Params vs Header Params -


i'm trying out apache camel (as routing engine). understand camel supports multiple dsls , configured using java (java dsl) or spring (spring dsl).

question:
have following spring dsl configuration. idea if incoming request has header-param called "name", hit when clause or else route request google:

 <camel:route>     <camel:from uri="servlet:///test" />     <camel:choice>         <camel:when>             <camel:header>name</camel:header>             <camel:transform>                 <camel:simple>hello ${header.name} how you?</camel:simple>             </camel:transform>         </camel:when>         <camel:otherwise>                 <camel:to uri="http://www.google.com?bridgeendpoint=true" />         </camel:otherwise>     </camel:choice> </camel:route> 

i expected above config work header param. however, noticed configuration working query params shown in following request:

http://localhost:8080/<war-context>/test?name=test 

is there way make sure made work header params ?

it's documented here query params copied exchange headers in servlet component.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -