valeriangalliat / fetch-cookie

Decorator for a `fetch` function to support automatic cookie storage and population. 🍪
The Unlicense
135 stars 29 forks source link

Support 307 / POST #54

Closed mmmdreg closed 4 years ago

mmmdreg commented 4 years ago

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.

valeriangalliat commented 4 years ago

That's interesting! Can you share your modified version of the code as a pull request? Cheers :)

AhmadAlHallak commented 4 years ago

I am also having the same issue> Using vanilla node-fetch works correctly while fetch-cookie doesn't redirect.

AhmadAlHallak commented 4 years ago

I made a pull request fixing this issue #55