func (a *HttpLoadbalancer) ProcessRequest(req context.ContextSpec) (*http.Response, error) { // None of the modules in the pipeline has intercepted the request, so lets hit the endpoint now! // TODO: - Transport should be configurable via options // - HTTP Header to be added: `X-Forwarded-Host` // Note that we rewrite request each time we proxy it to the // endpoint, so that each try gets a fresh start req.SetHttpRequest(copyRequest(req.GetHttpRequest(), req.GetBody(), a.url)) return http.DefaultTransport.RoundTrip(req.GetHttpRequest()) }