infinitered / apisauce

Axios + standardized errors + request/response transforms.
MIT License
2.8k stars 184 forks source link

Cannot intercept 302 redirects and read response headers #284

Open atomic-tang opened 2 years ago

atomic-tang commented 2 years ago

I am using apisauce in a react native project and I need to intercept 302 redirects to implement the OAuth2 PKCE flow. I've tried setting the maxRedirects option to 0 but it is still redirecting and I am getting a status code of 200 when logging the response on console. Is there a way to read response headers before the redirect happens?