Retry http request

I’m trying to hit an API, sometimes the connection is interrupted, result is status code is Zero 0, i want to retry the FTTP request activity to make sure it gets connection to retreive the Json response, please help me with suggestions on how to retry the HTTP request (api connection), once there is a result in status code it should move further, until then it should retry to connect.

Hi!

In the output of the HTTP Request activity, there is a “Status Code” field, you can create a variable to receive the result from this output and then use an “If” statement to check if the status code is 0 or not, if it is, you can use a ‘Throw’ statement with a ‘Retry Scope’ and set the amount of retries.

Refer to these posts to assist:

Best Regards,

@loka_shemanth - alternatively, you can use a “Do While” loop

As @Marcelo_Guimaraes stated, use the value from the “Status Code” in the Condition statement (Do While Status Code = 0).
Do add a delay between consecutive web calls.