如何保存HTTP调用的响应,直到Mule成功?

时间:2021-08-23 22:59:56

We are trying to call a REST service with a Mule HTTP connector. If we dont get a success, we want to re-send the request, something like this: <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

我们正在尝试使用Mule HTTP连接器调用REST服务。如果我们没有成功,我们想要重新发送请求,如下所示: < http:query-param paramName =“Take”value =“5”/>

However, we need the successfull response if we get one such. Is there a way to retrieve it and set it in the payload

但是,如果我们得到一个这样的话,我们需要成功的回应。有没有办法检索它并在有效负载中设置它

1 个解决方案

#1


You need to process it synchronously. Check out the Synchronous Until-Successful section here

您需要同步处理它。在此处查看同步直到成功部分

#1


You need to process it synchronously. Check out the Synchronous Until-Successful section here

您需要同步处理它。在此处查看同步直到成功部分