如何在mule中设置标题用户名和密码

如何在mule中设置标题用户名和密码,mule,Mule,若我像这样在mule中设置头username和pasword,那个么在日志消息中它会显示空值。欢迎提出任何建议请使用以下内容:- <message-properties-transformer scope="outbound"> <add-message-property key="http.headers.username" value="admin" /> <add-message-property key="http.headers.password"

若我像这样在mule中设置头username和pasword,那个么在日志消息中它会显示空值。欢迎提出任何建议

请使用以下内容:-

 <message-properties-transformer scope="outbound"> 
<add-message-property key="http.headers.username" value="admin" /> 
<add-message-property key="http.headers.password" value="admin"/>
<add-message-property key="Accept" value="application/json"/>
</message-properties-transformer>

    <logger message=" custom header username and password.... ... #[message.inboundProperties.'http.headers'.username]   #[message.inboundProperties.'http.headers'.password]  " level="INFO" /> 

并使用以下命令检索:-

<message-properties-transformer scope="outbound"> 
<add-message-property key="username" value="admin" /> 
<add-message-property key="password" value="password"/>
<add-message-property key="Accept" value="application/json"/>
</message-properties-transformer>

 <logger  message=" custom header username and password... #[message.outboundProperties['username']] and  #[message.outboundProperties['password']]"
        level="INFO" doc:name="Logger"/>