【发布时间】:2014-03-24 07:26:36
【问题描述】:
我正在尝试在 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"/>
但这也不起作用。我没有看到任何错误,但我得到的响应是没有自定义标头的响应。
我是否遵循了添加自定义标题的正确方法?我正在使用 Mule 3.2.0。
【问题讨论】:
标签: http mule custom-headers