Improve WebAPI flow with middleware
Closed this issue · 2 comments
Archomeda commented
Right now, the caching system is hardwired into the Connection class, which makes it difficult to implement custom logic like delaying the request when the rate limit has been hit.
Using a middleware-like system will make it easier to do that. It will also improve a few current systems in place:
- Calls to
.ManyAsync(...)
that are currently automatically split into multiple requests if they exceed the max page size of 200. Right now it sends all the requests at once through the ThreadPool, but a middleware would allow easy customization. - Caching can be implemented through middleware as well.
Archomeda commented
Referenced wrong PR number from commit.
Archomeda commented
This is currently being worked on in the middleware branch.