骆驼HTTP端点动态URL形成 [英] camel http endpoint forming url dynamically

查看:164
本文介绍了骆驼HTTP端点动态URL形成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好我试图用

{
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>
}

和这个网址会改变每个请求的路径。

and this url will change on every request to the route.

我已经尝试过。传递PARAMS作为标题,并使用标题(测试),试图在路由接入和使用$ {} in.header.test都似乎不工作。

What i have already tried. Passing params as headers and try to access in the route using the header("test") and using ${in.header.test} both doesn't seem to work.

任何建议,将是很大的帮助。

any suggestions will be greatly helpful.

推荐答案

请参阅此常见问题解答有关动态到端点的骆驼:的 http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html

See this FAQ about dynamic to endpoints in Camel: http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html

这篇关于骆驼HTTP端点动态URL形成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆