Skip to content
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

Feature Request: http interceptor in httpx #116

Open
hesch opened this issue Mar 6, 2024 · 0 comments
Open

Feature Request: http interceptor in httpx #116

hesch opened this issue Mar 6, 2024 · 0 comments

Comments

@hesch
Copy link

hesch commented Mar 6, 2024

Feature:

Implement a registration for http request interceptors, that can modify the request or do some other logic before the request is executed.
This can be used to set Headers dynamically or do necessary preflight requests.

Use Case:

I am currently implementing load tests that need authn/authz for an OAuth 2 secured endpoint. Everything works as expected, but if the load test is running longer than the lifetime of the access token, requests start to fail. At the moment, I am solving this by having a wrapper around httpx that checks/refreshes access tokens before firing requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant