如何在 Mule 中保存 HTTP 调用的响应直到成功?
How to save the response from a HTTP call until successs in Mule?
我们正在尝试使用 Mule HTTP 连接器调用 REST 服务。如果我们没有成功,我们想重新发送请求,就像这样:
<until-successful objectStore-ref="objectStore"
failureExpression="#[header:INBOUND:http.status != 200]"
maxRetries="6"
secondsBetweenRetries="600">
<http:request config-ref="ComAroundREST_API" path="api/v1/mostread" method="GET" doc:name="GetMostReadRESTCall">
<http:request-builder>
<http:query-param paramName="Take" value="5"/>
</http:request-builder>
</http:request>
</until-successful
但是,如果我们得到这样的响应,我们需要成功的响应。有没有办法检索它并将其设置在有效负载
您需要同步处理。查看同步直到成功部分 here
我们正在尝试使用 Mule HTTP 连接器调用 REST 服务。如果我们没有成功,我们想重新发送请求,就像这样:
<until-successful objectStore-ref="objectStore"
failureExpression="#[header:INBOUND:http.status != 200]"
maxRetries="6"
secondsBetweenRetries="600">
<http:request config-ref="ComAroundREST_API" path="api/v1/mostread" method="GET" doc:name="GetMostReadRESTCall">
<http:request-builder>
<http:query-param paramName="Take" value="5"/>
</http:request-builder>
</http:request>
</until-successful
但是,如果我们得到这样的响应,我们需要成功的响应。有没有办法检索它并将其设置在有效负载
您需要同步处理。查看同步直到成功部分 here