我正在尝试使用的人
{
from("direct:a").to (someUrl).processor(new Processor(){
@Override
public void process(Exchange arg0) throws Exception
{
// do something
}
});
where someUrl is of the type http://xyz.com/{id}?test=<value1>&test1=<value2>
}
并且此 url 将根据对路由的每个请求而更改。
我已经尝试过了。将参数作为 header 传递并尝试使用 header("test") 和使用 ${in.header.test} 在路由中访问似乎都不起作用。
任何建议都会很有帮助。
最佳答案
从 camel 2.16 开始你可以做这样的事情 -
from("direct:start")
.toD("${header.foo}");
关于http - Camel http端点动态形成url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15071934/