-
-
Notifications
You must be signed in to change notification settings - Fork 856
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
More advanced Transport API example. #984
Comments
I'm thinking it might also be possible to build features like retries (#784) and others using this sort of style. However, I'm still not certain these shouldn't belong to some sort of "transport wrapper" concept… E.g. throttling (or retries, or any sort of "modify the request/response flow" thing) should be fairly independent of how the actual request is made - we can also want to throttle requests to ASGI apps, over UDS, to a proxy, etc. (And… this is when I come back again with my "middleware" idea? 😅 #345) |
Transparent caching would also be nice imho, using HTTP cache headers and connecting it to something like https://github.com/argaen/aiocache |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Now that we've got a really tightly spec'ed Transport API, one useful thing we can do for the ecosystem is show our users how to do nifty things like adding in extra behaviour.
For example, here's a simple implementation of a throttle...
I've not tested this out, just looks about right to me. Might well be worth making sure I've got this right, and then adding it as an example in the docs?
Slightly dependant on #983, since really users need that in order to configure the
httpcore
pool nicely.The text was updated successfully, but these errors were encountered: