This is an automated email from the ASF dual-hosted git repository. zregvart pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new cd41c2f CAMEL-11919: Added component documentation cd41c2f is described below commit cd41c2f15ab419a0dd9e1a6faab79b7fa128fd81 Author: Zoran Regvart <zregv...@apache.org> AuthorDate: Fri Oct 20 10:16:46 2017 +0200 CAMEL-11919: Added component documentation --- .../src/main/docs/salesforce-component.adoc | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce-component.adoc b/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce-component.adoc index 51e0752..b50f940 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce-component.adoc +++ b/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce-component.adoc @@ -75,6 +75,34 @@ salesforce:operationName?options You can append query options to the URI in the following format, `?option=value&option=value&...` +### Passing in Salesforce headers and fetching Salesforce response headers + +With Camel 2.21 there is support to pass https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/headers.htm[Salesforce headers] +via inbound message headers, header names that start with `Sforce` or +`x-sfdc` on the Camel message will be passed on in the request, and +response headers that start with `Sforce` will be present in the outboud +message headers. + +For example to fetch API limits you can specify: + +[source,java] +------------------------ +// in your Camel route set the header before Salesforce endpoint +//... + .setHeader("Sforce-Limit-Info", constant("api-usage")) + .to("salesforce:getGlobalObjects") + .to(myProcessor); + +// myProcessor will receive `Sforce-Limit-Info` header on the outbound +// message +class MyProcessor implements Processor { + public void process(Exchange exchange) throws Exception { + Message in = exchange.getIn(); + String apiLimits = in.getHeader("Sforce-Limit-Info", String.class); + } +} +------------------------ + ### Supported Salesforce APIs The component supports the following Salesforce APIs -- To stop receiving notification emails like this one, please contact ['"commits@camel.apache.org" <commits@camel.apache.org>'].