softonic / axios-retry

Axios plugin that intercepts failed requests and retries them whenever possible
Other
1.87k stars 165 forks source link

Retry post request #281

Open eldoy opened 2 months ago

eldoy commented 2 months ago

Is there a reason why post requests are not retried by default?

I have to do this to make post requests work:

if (typeof config.retryCondition != 'function') {
  config.retryCondition = function (error) {
    return axiosRetry.isRetryableError(error)
  }
}
gitSambhal commented 2 months ago

@eldoy post is not idempotent request and this package only retries the idempotent requests by default. You can read about it https://blog.hubspot.com/website/idempotent-api