-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Rate Limiting #8
Comments
I am thinking about several options to add the feature:
Because of the use cases of bots, I think we need the dynamic option. |
For rate limiting policies, we should create policies that serve the purpose of the developer,
|
In terms of implementation, it would help to provide native support from the emulator in order to provide 429 headers / responses that would mimic webex behavior. for example: for the webex emulator hosted at Heroku, alternate option would be to use Heroku's core rate limiting feature, which is described here: check for rate_limit: https://devcenter.heroku.com/articles/platform-api-reference
|
I think we could also take a page from the https://github.com/jpjpjp/bot-test-framework-example project. This project introduces a middleware which allows the caller of the API to include headers that instruct the emulator to do certain things. In the bot test frameworkthe middleware handles headers that instruct it to wait for subsequent bot responses to various API responses and events in order to provide regression testing for bot logic. This same approach could be used to have the caller of the emulator instruct it to provide certain responses. As an example it could support requests that include headers like:
So if for example, I want to ensure that my app properly supports rate limiting retry logic I could make a request that includes:
The middleware could intercept the default emulator response and replace the specified elements as requests. This approach would be flexible and allow developers to test a variety of "hard to create" error conditions. The downside of this approach is that it requires the user of the emulator to correctly set the headers to values that match with what the Webex platform would return in the real world. Ideally the maintaintrs of the middleware could develop a nice collection of samples that developers could start from. |
goal would be to help do some QA by simulating 429 from the webex cloud platform
https://developer.webex.com/docs/api/basics#rate-limiting
The text was updated successfully, but these errors were encountered: