Added support for customizing the Gateway before it makes the HTTP request