将经过身份验证的curl请求转换为Apache Camel请求

时间:2016-06-08 13:24:28

标签: java apache-camel jbossfuse camel-ftp

curl -s -S -u user123:321pass https://12.15.13.12:3216 --data 
'<?xml version="1.0" encoding="UTF-8"?><data>Hello Man</data>' -H 'Content-Type: text/xml' -k

我需要将其更改为Apache Camel路由调用,如: -

private ProducerTemplate producer;// there are setters for this.
producer.requestBodyAndHeaders(endpointUri, requestBody,addHeaders, String.class);  

主要问题是如何通过此requestBodyAndHeaders传递用户名和密码。我尝试通过标题(标题为地图,键值对)

0 个答案:

没有答案