WeblateOrg / weblate

Web based localization tool with tight version control integration.
https://weblate.org/
GNU General Public License v3.0
4.53k stars 1k forks source link

Report throttling status in response headers #3628

Closed nijel closed 4 years ago

nijel commented 4 years ago

Is your feature request related to a problem? Please describe. Extensive API users might want to know state of throttling and might adjust their behavior based on that.

Describe the solution you'd like Report API throttling status in the HTTP headers, in similar way as GitHub does it, see https://developer.github.com/v3/rate_limit/#response

Describe alternatives you've considered Currently, the numbers are not exposed in any way, so user will not know status until he gets error.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/90517251-report-throttling-status-in-response-headers?utm_campaign=plugin&utm_content=tracker%2F253393&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F253393&utm_medium=issues&utm_source=github).
nijel commented 4 years ago

This might be approach to implement this: https://github.com/CMSgov/bluebutton-web-server/blob/04bd3821b252d94dcfbbaa3aa4132838b90f7d48/apps/dot_ext/throttling.py

github-actions[bot] commented 4 years ago

Thank you for your report, the issue you have reported has just been fixed.