// 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);
}
}
// 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);
}
}
Copy to ClipboardCopied!Toggle word wrapToggle overflow