-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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] Option to not follow redirects in the requests API #12911
Comments
@Meemaw what is the use-case for it? this would help us to prioritise it. |
@mxschmitt We're using Playwright to test an application with server side rendering. Some of the tests are testing that our server correctly redirects you based on your permissions (e.g redirection to We could test that by just navigating to that page using We currently use |
We have a similar use case and would greatly appreciate this. We mostly use |
One use case that I use is: -- Inspect the first call has a status of 302 |
I have similar use cases too, I often need to check the redirect location for some auth routes and this feature would be very useful. Currently we are using another request module to handle this use case. |
Yes want to check the set-cookie header on a 302 redirect to intercept it and set it via playwright since chromium blocks third-party cookies in incognito mode (aka playwright default settings) using fetch currently as a work around |
Same as the people above me. I'm testing for the 302 status, location in the header and correct cookies. My workaround is using Axios but I try to replace it entirely with Playwright. |
The
request
fixture methods seems to follow the redirects by default. It would be great if there was an option to disable this behaviour.The text was updated successfully, but these errors were encountered: