Skip to content

Feature Request: http interceptor in httpxΒ #116

@hesch

Description

@hesch

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions