View original request response header using axios

Tags: ,



When I make my web request in the firefox devtools I get two network responses

The two responses

However when I make a request using axios. Axios is only printing out the response to the second response, and I need data from the first response with the status of 302, but I only get the 200 status response

Answer

You can modify maxRedirects to 0 in your request configurations. https://github.com/axios/axios#request-config

This should help you.



Source: stackoverflow