'Not getting the response header location when calling a get request using NodeJS got package

I have a request url which returns a redirection url in response > header > location. But when checking the response.headers after a request using the got package, couldn't see the location parameter in header. Saw something like adding method methodRewriting parameter but doesn't seems to have any effect.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source