Using NodeJS, If I use axios with maxRedirects = 5, If I type a URL that will be redirected to another URL, how can I get the URL from the final landing page? In HTTP headers, when there is an HTTP 200 code, there is no header field for the landing page.
Example: if I use:
axios.get('http://stackoverflow.com/',config)
.then(function(response) { console.log(response);}
axios will automatically redirect to https://stackoverflow.com. So, how can get the final URL value "https://stackoverflow.com"?
Should I investigate in the returned object "response" and recreate the full url from domain and URI?