-
-
Notifications
You must be signed in to change notification settings - Fork 934
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
Added option to toggle automatic following redirects #166
Added option to toggle automatic following redirects #166
Conversation
137bbd4
to
c5b0699
Compare
+1 |
After much thinking I'm 👍 on this. @floatdrop You ok with this? |
@sindresorhus how about merge this with |
@floatdrop We don't have a |
@sindresorhus yep, just an idea. |
I'm not a big fan of |
c5b0699
to
b3cd961
Compare
rebased |
@ruyadorno are you sure that making redirect a successful result for request is a good idea? As far as I know it is not usual behavior. |
@RoobinGood that's a good point, I'm not really sure of anything 😊 It does make sense in the context of the original use case behind this idea, as described in #165 but at the end of the day I just want to access the original redirect HTTP response in case of a 300 error, I guess that could also be achieved by attaching the response to the thrown It's also worth noting that we're talking about an optional configuration, it won't change the way got behaves if you don't use the |
@sindresorhus @ruyadorno are we ready to merge this option? |
👍 sure, it was a good point brought to the discussion by @RoobinGood but I still think the current implementation is better 😊 we're getting more people interested in having this option... let's merge this |
Hi @floatdrop and @sindresorhus,
I'm opening this PR with the goal of illustrating what such an option as described on #165 would look like.
Please review at your own discretion.
Thanks in advance 👍