Just had a bash at adding this myself, and it seems to work nicely for my usecase...
Adding this changing calls to post or get, and defining a parameter for retry attempts
```
ruxc_http_get(&v_http_request, &v_http_response);
//Retry enabled, either have a server error code or a connection error
int attempt;
attempt = 0;
while(attempt < _ruxc_http_retry && (v_http_response.retcode < 0 ||
(v_http_response.rescode > 499 && v_http_response.rescode < 699)){
attempt++;
LM_DBG("Retrying Request Attempt: %d - Response Code: %d - Return Code: %d - URI:
%s\n",
attempt, v_http_response.retcode, v_http_response.rescode, v_http_request.url);
ruxc_http_get(&v_http_request, &v_http_response);
}
```
Im loving ruxc lol
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2820#issuecomment-896719750