Skip to content

Redirect handling parity with httpx: per-request follow_redirects and event hooks #603

Closed

Description

@vdusek

In httpx (and httpx2), follow_redirects is a client default that each request can override: request(), stream(), and send() all take follow_redirects. The client also takes event_hooks, which run for every request in a redirect chain, so a caller can adjust headers on the way.

impit has follow_redirects and max_redirects only on Client / AsyncClient, and no hooks. Could request() and stream() take follow_redirects like httpx does? Hooks or a max_redirects override would be nice too, but per-request follow_redirects is the main gap.

✍️ Drafted by Claude Code

Activity

  1. added
    enhancementNew feature or request.
    t-toolingIssues with this label are in the ownership of the tooling team.
    on Oct 30, 2026
  2. changed the title [-]Per-request follow_redirects, or dropping custom headers on cross-origin redirects[/-] [+]Per-request follow_redirects, as in httpx[/+] on Oct 30, 2026
  3. changed the title [-]Per-request follow_redirects, as in httpx[/-] [+]Redirect handling parity with httpx: per-request follow_redirects and event hooks[/+] on Oct 30, 2026
  4. added a commit that references this issue on Nov 11, 2026
    aa971fc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request.t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions