我有2个API:
http://hostnameA/pathA
http://hostnameB/pathB
API A调用API B,表示:客户端发送请求 - > API A - > API B. 现在我想在API B获取API A的主机名(注意:API B由我创建,API A由其他人创建,我无法触及API A)。
请告诉我如何获取API A的主机名?
答案 0 :(得分:0)
只需使用以下MEL表达式:
#[message.inboundProperties.MULE_REMOTE_CLIENT_ADDRESS]
答案 1 :(得分:0)
我试过这个并不起作用:( 此外,我尝试了这些链接上的示例,但没有显示ip:
http://mule.1045714.n5.nabble.com/Obtaining-client-IP-address-in-the-HTTP-transport-td5110002.html http://forums.mulesoft.com/questions/6087/getting_remote_ip_address_and_remote_ip_url.html
这对我有用:
[INFO ] 2015-01-01 10:10:10.10 [shared-http-listener.worker.01] [] LoggerMessageProcessor - 20.30.xyz.abc
控制台:
<application
android:name="com.packname.MyApplication"
.../application>