Closed mmmdreg closed 4 years ago
That's interesting! Can you share your modified version of the code as a pull request? Cheers :)
I am also having the same issue> Using vanilla node-fetch works correctly while fetch-cookie doesn't redirect.
I made a pull request fixing this issue #55
Right now this library supports 301, 302, and 303 redirect and changes the method to GET
There is also a 307 which has the unique property of retaining the method and body, so a POST will be redirected as a POST with the same body and options.
We have an auth server that returns 307s and I have modified the code and it works fine.
userOptions
with decrementedfollow
instead ofoptsForGet