This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 72470f88992 18913: simple language - Add join function that for 
example can be used in camel-http to build multi-value query
72470f88992 is described below

commit 72470f889924feb17a3d49c0caafbeea3b59cb1b
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Jan 13 13:04:01 2023 +0100

    18913: simple language - Add join function that for example can be used in 
camel-http to build multi-value query
---
 .../java/org/apache/camel/component/http/HttpSetHeaderIdsTest.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSetHeaderIdsTest.java
 
b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSetHeaderIdsTest.java
index 09349ed2376..27af50bdae0 100644
--- 
a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSetHeaderIdsTest.java
+++ 
b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSetHeaderIdsTest.java
@@ -65,7 +65,7 @@ public class HttpSetHeaderIdsTest extends BaseHttpTest {
             @Override
             public void configure() throws Exception {
                 from("direct:myids")
-                        .setHeader(Exchange.HTTP_QUERY, 
simple("${join(&,id=,${header.ids})}"))
+                        .setHeader(Exchange.HTTP_QUERY, 
simple("ids=${join(&,id=,${header.ids})}"))
                         .removeHeader("ids")
                         .to("http://localhost:"; + localServer.getLocalPort() + 
"/myids");
             }
@@ -75,7 +75,7 @@ public class HttpSetHeaderIdsTest extends BaseHttpTest {
     @Test
     public void testIds() throws Exception {
         String o = fluentTemplate.to("direct:myids").withHeader("ids", 
List.of(1, 2, 3)).request(String.class);
-        Assertions.assertEquals("/myids?id=1&id=2&id=3", o);
+        Assertions.assertEquals("/myids?ids=id=1&id=2&id=3", o);
     }
 
 }

Reply via email to