我是 Mule 的新手并尝试使用 HTTP 端点发布 GET 请求,但我收到以下错误
“模板端点” http://api.mymemory.translated.net:80/get?q=#[message.inboundProperties.get ('http.relative.path')]&langpair=EN|IT" 解析为格式错误的端点“ http://api.mymemory.translated.net:80/get?q=hello&langpair=EN|IT ”。无法通过端点路由事件:org.mule.endpoint.DynamicOutboundEndpoint”
我尝试了以下配置:
get?q=hello&langpair=EN%7CIT
[作品]
get?q=#[message.inboundProperties.get('http.relative.path')]&langpair=EN%7CIT
[不起作用]
get?q=#[message.inboundProperties.get('http.relative.path')]&langpair=EN|IT
[不起作用]
堆栈跟踪似乎表明“|”有问题 特点。
我的流程如下:
<flow name="my_first_projectFlow1" doc:name="my_first_projectFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP"/>
<http:outbound-endpoint exchange-pattern="request-response" host="api.mymemory.translated.net" port="80" path="get?q=#[message.inboundProperties.get('http.relative.path')]&langpair=EN%7CIT" method="GET" doc:name="HTTP"/>
<echo-component doc:name="Echo"/>
</flow>