[英]Camel proxy Dynamic url Parameter setting
我有一條路線:
來自路線是一個REST呼叫。
from("http://com.containerhost:8080/").
.setHeader("param3",param3)
.to(anotherURL?queryparam1="queryparam1ofRESTCALL"&queryparam2="queryParam2ofRESTCall"&queryparam3=${header.param3}")
但駱駝並沒有認識到這個參數3,即使它在標題中設置。 在我的情況下,param 3是一把鑰匙。 必須只添加到TO uri,它不應該暴露給FROM Uri Rest call。所以請告訴我如何在這個場景中動態添加多個參數。當我通過論壇時,他們告訴我要看到了接收列表。但是無法從Camel獲取更多信息http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html我不知道如何使用Recepient列表。 如果你能給我一些投入,那將會有很大的幫助。 謝謝並恭祝安康。
簡單的收件人列表是動態的。 做就是了:
.recipientList(simple("anotherURL?queryparam1=queryparam1ofRESTCALL
&queryparam2=queryParam2ofRESTCall
&queryparam3=${header.param3}"));
除了recipientList
模式之外,您可以設置Exchange.HTTP_QUERY
標頭:
exchange.getIn().setHeader(Exchange.HTTP_QUERY, "...");
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.