Swapped the standard http module for 'request' which can perform http requests through a proxy defined using environment variables.