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 传递用户名和密码。我尝试通过标头(标头是映射,键值对)