Skip to content

Allow global follow_redirects option.#2207

Merged
Kludex merged 1 commit intoKludex:masterfrom
alex-oleshkevich:follow-redirects
Jul 6, 2023
Merged

Allow global follow_redirects option.#2207
Kludex merged 1 commit intoKludex:masterfrom
alex-oleshkevich:follow-redirects

Conversation

@alex-oleshkevich
Copy link
Contributor

When you have many good-old HTML forms and use post-redirect-get pattern, it quickly becomes noisy to add follow_redirects=False to each HTTP call if you want to check the redirect location and headers (like 200/400 for form validation errors and 30x for successful submissions).

Setting follow_redirects at TestClient level makes things simpler and less repeatable.

Copy link
Owner

@Kludex Kludex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Kludex Kludex merged commit d6007d7 into Kludex:master Jul 6, 2023
Kludex pushed a commit that referenced this pull request Jul 7, 2023
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

Successfully merging this pull request may close these issues.

2 participants