camel http4 producer encodes an array data to the http uri parameter as comma separated

Solution Verified - Updated -

Issue

camel http4 producer encodes an array data to the http uri parameter as comma separated.

camel route

    .setHeader(Exchange.HTTP_QUERY, simple("ids=${header.ids}"))
    .to("http4://localhost:8181/sample/test/hello");

http request

http://localhost:8181/sample/test/hello?ids=[Bob, Nancy, David]

How to make the uri parameter as multi-values?

http://localhost:8181/sample/test/hello?ids=Bob&ids=Nancy&ids=David

Environment

  • Red Hat Fuse
    • 7.11

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content