我正在尝试在 Mule 的 HTTP 端点中添加一个自定义标头:
<flow name="flow">
<poll frequency="60000">
<http:outbound-endpoint
address="http://user:pass@example.com"
followRedirects="true" method="GET" exchange-pattern="request-response">
<properties>
<spring:entry key="CUSTOM-HEADER-NAME" value="custom-header-value" />
</properties>
</http:outbound-endpoint>
</poll>
<echo-component />
</flow>
但是这种使用<spring:entry>
元素添加自定义标题的方式似乎不起作用。
我尝试更换
<properties>
<spring:entry key="CUSTOM-HEADER-NAME" value="custom-header-value" />
</properties>
和
<property key="CUSTOM-HEADER-NAME" value="custom-header-value"/>
但这也不起作用。我没有看到任何错误,但是我得到的响应是没有自定义标头的响应。
我是否遵循正确的方法来添加自定义标题?我正在使用骡子 3.2.0。