简体   繁体   English

骆驼收件人列表参数顺序

[英]Camel recipientList param order

I have a route defined like this: 我有一条这样定义的路线:

from("direct:performEbayHttpCall")
.setHeader("HTTP_METHOD", constant("GET"))
.setBody(constant(null))
.log("${headers.EBAY_URL}")
.recipientList(simple("http://${headers.EBAY_URL}"))
.unmarshal().json(JsonLibrary.Gson);

When the log endpoint gets called the EBAY_URL is correct, I can copy and paste it into a browser and it works. 当日志端点被称为EBAY_URL正确时,我可以将其复制并粘贴到浏览器中,并且可以正常工作。

However when the http request is made, the url parameters are in completely the wrong order and thus causing a 500 response to be returned from the server. 但是,当发出http请求时,url参数的顺序完全错误,从而导致从服务器返回500响应。

Is there a way to tell camel to not mess about with the ordering of the url? 有没有办法告诉骆驼不要弄乱网址的顺序?

No the query parameter ordering should NOT matter. 没有查询参数顺序应该无关紧要。 Any HTTP server should accept query parameters in whatever order they are, eg a=1&b=2 is the same as b=2&a=1 任何HTTP服务器都应以任意顺序接受查询参数,例如a = 1&b = 2与b = 2&a = 1相同

Camel validates and normalizes the URI and the query parameters is listed in A..Z order. Camel验证并规范化URI,查询参数按A..Z顺序列出。 (nor random). (也不随机)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM