【发布时间】:2014-09-21 12:17:28
【问题描述】:
为什么 Mule http 入站端点总是 GET 请求。我正在记录 http 方法的类型
它总是记录类型是 GET 即使我在 http 入站端指定了方法类型 PUT
观点。
<http:inbound-endpoint exchange-pattern="request-response"
path="testPath" doc:name="HTTP"
host="localhost" port="8083"
mimeType="application/json"
method="PUT"/>
<logger level="INFO" message="method type #[message.inboundProperties['http.method']]"
doc:name="Logger"/> <--- It always logs method is GET
It never go into following expression block:
<choice doc:name="Choice">
<when expression="#[message.inboundProperties['http.method']=='PUT']">
我想在 http 入站端点中将 http 方法设置为“PUT”
【问题讨论】:
-
你的 HTTP 请求是怎样的?
-
我正在通过浏览器发出我的 http 请求,使用 localhost:8083/testPath
-
所以...您的端点总是会收到 HTTP GET,对吧?
-
所以我在 Http 入站端点之后有一个 Mule-Logger。我在该记录器中记录 http 方法类型。是否有人需要调用我的 Http 入站端点来获取正确的方法类型?目前我只通过浏览器调用我的 Http 入站端点......