<p></p>

<h3>Description</h3>
<p>Could a module parameter be added to retry a request <em>n</em> number of times in the event of a connection or server failure, without having to write a tedious bit of boiler plate config to catch failure response codes and retry.</p>
<h3>Expected behavior</h3>
<p>A http(s) post or get is performed and the returned code is < 0 but > -20 (null url return code in libruxc) or is a 5xx or 6xx http error code.  The module will reattempt the request up to the number of attempts defined in a module parameter.<br>
By default this behaviour is disabled and would require explicitly defining the module parameter to enable it.<br>
Requests could be exempted from automatic retries by either adding an additional argument to the function called in config, or a http header could be supplied <code>X-RUXC-NORETRY</code> for example using the existing function signature to exclude the request.<br>
The header name could also be defined as a module parameter.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2820">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZIJ2FDWXBKRJG64L53T4I2YTANCNFSM5B55HZVQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email">Android</a>.<img src="https://github.com/notifications/beacon/ABO7UZKCPPDNPLN7LINKBN3T4I2YTA5CNFSM5B55HZV2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4OMYAXPQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2820",
"url": "https://github.com/kamailio/kamailio/issues/2820",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>