[ 
https://issues.apache.org/jira/browse/CAMEL-14163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16970561#comment-16970561
 ] 

Zoran Regvart commented on CAMEL-14163:
---------------------------------------

Actually I found out that with a small tweak to the way query parameter values 
are passed, that is without forcing them to convert to Strings, the support in 
{{URISupport::createQueryString}} generates the correct URI. So no need for any 
special indicator for this case.

> Support for multiple request query parameters in Rest component
> ---------------------------------------------------------------
>
>                 Key: CAMEL-14163
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14163
>             Project: Camel
>          Issue Type: Improvement
>          Components: rest
>    Affects Versions: 2.18.0
>            Reporter: Zoran Regvart
>            Assignee: Zoran Regvart
>            Priority: Major
>
> The RestProducer doesn't have a way for specifying multiple query parameters. 
> Given a header value that's a collection of values the resulting query 
> parameter will be a joining of those values with the comma separator.
> Given that the query parameter can be specified multiple times, it is more 
> common to have the parameter specified for each value of the collection 
> rather than a single parameter with the coma-separated list of values.
> For example, endpoint URI of {{rest:GET:/v2/:pet/findByStatus}} and endpoint 
> property {{queryParameters}} set to {{status=\{status\}}}, and on the message 
> header the {{status}} is a collection or array of values (e.g. 
> {{["available", "pending"]}}), the resulting URI path will be 
> {{/v2/pet/findByStatus?status=available,pending}}.
> I think we could extemd the syntax of the placeholder (the {{\{status\}}}) to 
> indicate that multiple query parameters should be provided instead of the 
> coma-separated values.
> Perhaps something like {{status=\{status*\}}} as we already have 
> {{status=\{status?\}}} to signify optional parameters. This would generate 
> the URI path as {{/v2/pet/findByStatus?status=available&status=pending}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to