Feature Request: Optional retries on HTTP requests #80
Replies: 3 comments
-
Hey @DamianHeard appreciate your feedback! I'm going to convert this to a discussion topic for the community to gauge temperature as it's not something we've seen requested previously. If you would like to put up a PR for the change we'd welcome the contribution! |
Beta Was this translation helpful? Give feedback.
-
@rdemarco-xero can we implement @DamianHeard 's suggestion above? This relates to the timeout issue and could fix that. |
Beta Was this translation helpful? Give feedback.
-
Waiting on a daily rate limit retry is not a very nice experience, I had to jump through hoops to manage the retry logic; the more conventional approach would be to pass our own retries object (@DamianHeard 's suggestion) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Background
xero-python
usesurllib3
under the hood. By default, urllib3 will retry requests 3 times which is not necessarily desirable, particularly if rate limiting is in play. In some case it might make sense to the API user to handle retries themselves.Proposed solution
xero_python.api_client.configuration.Configuration
should acceptretries
as an argument which in turn would be passed down to theurllib3.PoolManager
orurllib3.ProxyManager
during initialisation.I'm happy to put a PR up if you feel the change has merit.
Beta Was this translation helpful? Give feedback.
All reactions