Cancel redirect in BeforeRedirect hook. #2305
Replies: 2 comments
-
Thanks to anyone for your responses in advance. I appreciate your help. |
Beta Was this translation helpful? Give feedback.
0 replies
-
A potential Fix -> #2306 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The request library has an option to pass a function to the
followRedirect
option, it helped to determine dynamically whether the next request should be performed. Got doesn't have that option, but has hooks. I tried to set followRedirect to false in the beforeRedirect hook, but that didn't help. As I understood once set options are not doing anything before the redirects are done. So my question would be how would I cancel the redirect action or the request if needed? @sindresorhus is this something I need to contribute in the library or we already have a solution?Beta Was this translation helpful? Give feedback.
All reactions