[
https://issues.apache.org/jira/browse/CAMEL-11050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15936935#comment-15936935
]
ASF GitHub Bot commented on CAMEL-11050:
----------------------------------------
GitHub user zregvart opened a pull request:
https://github.com/apache/camel/pull/1560
CAMEL-11050 Support for optional query parameters in REST component
This is a small change, but I might not be aware of the consequences, so
submitting for review, thanks :1st_place_medal:
This adds support for optional query parameters in REST component. Optional
query parameters will not be added to the dispatched query parameters if not
present in the incoming message headers.
To make a query parameter optional one needs to denote it by adding `?` to
the header name, for instance: `param={param?}`.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zregvart/camel CAMEL-11050
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/1560.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1560
----
commit 1ffe934d9f2ce2a7ca5c4e635ab1a8b89608edb7
Author: Zoran Regvart <[email protected]>
Date: 2017-03-22T18:36:09Z
CAMEL-11050 Support for optional query paramete...
...rs in REST component
This adds support for optional query parameters in REST component.
Optional query parameters will not be added to the dispatched query
parameters if not present in the incoming message headers.
To make a query parameter optional one needs to denote it by adding `?`
to the header name, for instance: `param={param?}`.
----
> Support for optional query parameters in REST component
> -------------------------------------------------------
>
> Key: CAMEL-11050
> URL: https://issues.apache.org/jira/browse/CAMEL-11050
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.19.0
> Reporter: Zoran Regvart
> Assignee: Zoran Regvart
> Priority: Minor
>
> I would like to add support for optional query parameters in REST component.
> These optional parameters would not be added to the dispatched HTTP request
> unless present in the message headers. Currently if not present they would be
> passed as {{param={header_name}}}.
> I propose adding {{?}} to the {{header_name}} to signify that this parameter
> is optional, i.e. in endpoint URL {{param={header_name?}}}.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)